POWERSHELL 快捷函数
2020-02-12 本文已影响0人
Alexever
生成随机字符串
#lowercase letters/numbers only
-join ((48..57) + (97..122) | Get-Random -Count 32 | % {[char]$_})
#lowercase and uppercase letters / numbers
-join ((48..57) + (65..90) + (97..122) | Get-Random -Count 32 | % {[char]$_})
# all characters
-join ((33..126) | Get-Random -Count 32 | % {[char]$_})