PowerShell Scripts, Tips, Expert Advices, Forums, and Resources

image rotation

Welcome to PowerShell.com, the educational and community site for Windows PowerShell People. Get a quick overview.

Latest Scripts

11-27-2014 - Active Directory and GPO Import
11-26-2014 - Exports
11-20-2014 - Are my servers online?

Latest Blog Posts

11-28-2014 - Network Connection Reset in iTunes
11-28-2014 - Get-Stack1.ps1
11-28-2014 - Randomize Lists of Numbers

Latest Announcements/Events

10-31-2014 - Using PowerShell to download Teched Europe 2014 content
10-15-2014 - Class Dismissed
10-12-2014 - The Case for PowerShell

As a Powershell.com member you will have access to:

  • Daily PowerShell tips written by Microsoft MVPs and other leading Windows PowerShell experts
  • Free Windows PowerShell advice and training provided by Microsoft MVPs and other leading Windows PowerShell experts
  • Access to leading Windows PowerShell blogs
  • A free ebook, Mastering PowerShell, written by Microsoft MVP Dr. Tobias Weltner
PowerTip of the Day

Randomize Lists of Numbers

All PowerShell versions

This line will take a list of numbers and randomize their order:

Get-Random -InputObject 1, 2, 3, 5, 8, 13 -Count ([int]::MaxValue)

Piping works too, but it's slower:

1, 2, 3, 5, 8, 13 | Sort-Object -Property { Get-Random }

Twitter This Tip! ReTweet this Tip!

Copyright 2012 PowerShell.com. All rights reserved.