PowerTip: Use PowerShell to Choose Random Letters

Doctor Scripto

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

0 comments

Discussion is closed.

Feedback usabilla icon