Gets the unique items in a sorted list.
Snap-In: Microsoft.PowerShell.Utility
Syntax:
Get-Unique
[-InputObject <PSObject>] [-AsString] [-Verbose] [-Debug] [-ErrorAction <ActionPreference>] [-ErrorVariable <String>] [-OutVariable <String>] [-OutBuffer <Int32>]
Get-Unique
[-InputObject <PSObject>] [-OnType] [-Verbose] [-Debug] [-ErrorAction <ActionPreference>] [-ErrorVariable <String>] [-OutVariable <String>] [-OutBuffer <Int32>]
Description:
The get-unique Cmdlet examines the items in a collection and compares each item to the next item in the collection. It then separates out one unique copy of e ach sequential item and sends the list to the pipeline. To get a unique list of items, sort the objects before passing them to the get-unique Cmdlet.