January 25th, 2014

PowerTip: Use PowerShell to Choose Random Letters

Doctor Scripto
Scripter

Summary: Use Windows PowerShell to choose random letters.

Hey, Scripting Guy! Question How can I use Windows PowerShell to arrange five letters in a random order?

Hey, Scripting Guy! Answer Use the Get-Random cmdlet, specify the letters as input values,
          and then use the –count parameter to specify how many to choose:

Get-Random -InputObject 'a','b','c','d','e' -Count 5

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.