PasswordGenerator.ps1 891 B

1234567891011121314151617181920
  1. # Arrays definition
  2. $minuscule = @('alpha','bravo','charlie','delta','echo','foxtrot','golf','hotel','india','juliette','kilo','lima','mike','november','oscar','papa','quebec','romeo','sierra','tango','uniform','victor','whisky','yankee','xray','zulu')
  3. $majuscule = @('ALPHA','BRAVO','CHARLIE','DELTA','ECHO','FOXTROT','GOLF','HOTEL','INDIA','JULIETTE','KILO','LIMA','MIKE','NOVEMBER','OSCAR','PAPA','QUEBEC','ROMEO','SIERRA','TANGO','UNIFORM','VICTOR','WHISKY','YANKEE','XRAY','ZULU')
  4. $symbol = @('@','+','-','&')
  5. # To repeat permanently
  6. $boucle = 0
  7. # Password generation
  8. while($boucle -ne 1)
  9. {
  10. # Select random object
  11. $min = Get-Random -InputObject $minuscule -Count 1
  12. $maj = Get-Random -InputObject $majuscule -Count 1
  13. $num = Get-Random -Maximum 99
  14. $sym = Get-Random -InputObject $symbol -Count 1
  15. Write-Host "$min$maj$sym$num" -ForegroundColor Green
  16. pause
  17. }