Last active
December 3, 2020 17:34
-
-
Save JeremyTBradshaw/72081ffa090c458e7a755fdda64db63c to your computer and use it in GitHub Desktop.
Quick fake certificate thumbprints (and Guid's)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For documentation purposes, sometimes I need fake thumbprints (and Guid's). | |
function New-FakeThumbprint ([ValidateRange(1, 10)][int]$Count = 1) { | |
1..$Count | ForEach-Object { | |
( | |
1..40 | Foreach-Object { | |
Get-Random @('A', 'B', 'C', 'D', 'E', 'F', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9') | |
} | |
) -join '' | |
} | |
} | |
New-Alias -Name nft -Value New-FakeThumbprint | |
# .Example: nft 5 (outputs 5 fake thumbprints) | |
# While we're here, Guids: | |
function New-Guid ([ValidateRange(1, 10)][int]$Count = 1) { 1..$Count | Foreach-Object { [Guid]::NewGuid() } } | |
New-Alias -Name ng -Value New-Guid | |
# .Example: ng 5 (outputs 5 new Guid's) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment