PasswordGenerator.ps1 805 B

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