Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
A quick function to replicate some of the functionality of
function Get-RandomPassword {
$Count = 1,
$Separator = '-'
$words = (Invoke-WebRequest '' | Select-Object -ExpandProperty Content).Split(',')
1..$Count | ForEach-Object {"$([string]::Join($Separator,(1..4 | ForEach-Object {[cultureinfo]::CurrentCulture.TextInfo.ToTitleCase(($words | Get-Random))})))$Separator$(1..99 | Get-Random)"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment