Contact Info

Crumbtrail

ActiveXperts.com » Administration » Powershell » Powershell 1.0 » Get-Unique

Get-Unique - Powershell 1.0 CmdLet

ActiveXperts Network Monitor ships with integrated Powershell scripts to monitor complex network. The scripts run out of the box
Download the ActiveXperts Network Monitor FREE version now »

Get-Unique

Description
Get the unique items in a collection

Usage


Options


Example(s)
Sort an array of integers, and display the unique values:

PS C:\>2,4,6,8,2,64,4,2,99,3 | sort-object | Get-Unique

List every folder on the C: drive that contains one or more .xls files:

PS C:\>gci C:\ -include *.xls -recurse |foreach {$_.directoryName} | get-unique

for more examples:

PS C:\>help get-unique -detailed