diff --git a/Intune/Random-PWGen.ps1 b/Intune/Random-PWGen.ps1 new file mode 100644 index 0000000..a2bab87 --- /dev/null +++ b/Intune/Random-PWGen.ps1 @@ -0,0 +1,15 @@ +$TokenSet = @{ + U = [Char[]]'ABCDEFGHIJKLMNOPQRSTUVWXYZ' + L = [Char[]]'abcdefghijklmnopqrstuvwxyz' + N = [Char[]]'0123456789' + S = [Char[]]'!"#$%&''()*+,-./:;<=>?@[\]^_`{|}~' +} + +$Upper = Get-Random -Count 5 -InputObject $TokenSet.U +$Lower = Get-Random -Count 5 -InputObject $TokenSet.L +$Number = Get-Random -Count 5 -InputObject $TokenSet.N +$Special = Get-Random -Count 5 -InputObject $TokenSet.S + +$StringSet = $Upper + $Lower + $Number + $Special + +(Get-Random -Count 15 -InputObject $StringSet) -join '' \ No newline at end of file