PowerShell: Random Select

User avatar
Site Admin
Posts: 17
Joined: Mon Jun 17, 2019 2:19 pm

PowerShell: Random Select

Postby hamid Mon Jul 08, 2019 10:30 am

Hello Club!

With PowerShell, when you're creating Variables with contents you can use Get-Random Command in order to choose randomly from contents you've created.


Create a Variable called $Variable test with numbers in it.

= 1,2,3,4

Then call them randomly with the command below.

Get-Random $VariableTest
Microsoft MVP: Cloud and Datacenter Management

Return to “PowerShell Learning”

Who is online

Users browsing this forum: No registered users and 2 guests