Contact Info

Crumbtrail

ActiveXperts.com » Administration » Powershell » Powershell 3.0 » Select-Object

Select-Object - Powershell 3.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 »

Select-Object

Short description
Selects objects or object properties.

Syntax
Select-Object [[-Property] <Object[]>] [-ExcludeProperty <String[]>] [-ExpandProperty <String>] [-First <Int32>] [-Inpu
tObject <PSObject>] [-Last <Int32>] [-Skip <Int32>] [-Unique] [-Wait] [<CommonParameters>]
Select-Object [-Index <Int32[]>] [-InputObject <PSObject>] [-Unique] [-Wait] [<CommonParameters>]





Description
The Select-Object cmdlet selects specified properties of an object or set of objects. It can also select unique objects
, a specified number of objects, or objects in a specified position in an array.


To select objects from a collection, use the First, Last, Unique, Skip, and Index parameters. To select object properti
es, use the Property parameter. When you select properties, Select-Object returns new objects that have only the specif
ied properties.


Beginning in Windows PowerShell 3.0, Select-Object includes an optimization feature that prevents commands from creatin
g and processing objects that are not used. When you include a Select-Object command with the First or Index parameters
 in a command pipeline, Windows PowerShell stops the command that generates the objects as soon as the selected number 
of objects is generated, even when the command that generates the objects appears before the Select-Object command in t
he pipeline. To turn off this optimizing behavior, use the Wait parameter.