Quantcast
Viewing all articles
Browse latest Browse all 30

PowerShell: Generate a Pseudo-Random String

Here’s a quick way to generate a pseudo-random string with PowerShell:

$Length = 20
$AllowedCharacters = "abcdefghijklmnopqrstuvwxyz0123456789".ToCharArray()
$MyRandomString = -join (Get-Random -Count $Length -InputObject $AllowedCharacters)

Hope this helps!


Viewing all articles
Browse latest Browse all 30

Trending Articles