Contact Info

Crumbtrail

ActiveXperts.com » Administration » Powershell » Powershell 1.0 » Group-Object

Group-Object - 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 »

Group-Object

Description
Group the objects that contain the same value for a common property

Usage


Options


Example(s)
Display a list of files grouped by size:

PS C:\>get-childitem *.doc | group-object -property length

Display a list of files, sorted and then grouped by the file extension:

PS C:\>get-childitem | sort-object -property extension | group-object -property extension

Count the file extensions (in the current directory) without retrieving all the files:

PS C:\>get-childitem | group-object extension -noelement