Contact Info

Crumbtrail » Administration » Powershell » Powershell 2.0 » Select-Object

Select-Object - Powershell 2.0 CmdLet

Microsoft Windows PowerShell is a command-line shell and scripting tool based on the Microsoft .NET Framework. It is designed for system administrators, engineers and developers to control and automate the administration of Windows and applications.

More than hundred command-line tools (so called "cmdlets") can be used to perform system administration tasks and Windows Management Instrumentation (WMI). These cmdlets are easy to use, with standard naming conventions and common parameters, and standard tools for piping, sorting, filtering, and formatting data and objects.


Short description
Selects specified properties of an object or set of objects. It can also select unique objects from an array of obj

Select-Object [[-Property] <Object[]>] [-ExcludeProperty <string[]>] [-ExpandProperty <string>] [-First <int>] [-In
putObject <psobject>] [-Last <int>] [-Skip <int>] [-Unique] [<CommonParameters>]

Select-Object [-Index <Int32[]>] [-InputObject <psobject>] [-Unique] [<CommonParameters>]

The Select-Object cmdlet gets only the specified properties of an object or set of objects. It can also select uniq
ue objects from an array of objects, or it can select a specified number of objects from the beginning or end of an
 array of objects.
If you use Select-Object to select specified properties, it copies the values of those properties from the input ob
jects and creates new objects that have the specified properties and copied values. 

Use the Property parameter to specify the properties you want to select. Or, use the First, Last, Unique, Skip, and
 Index parameters to select particular objects from an array of input objects. For more specific object filtering, 
use the Where-Object cmdlet.