PowerShell by Patrik

Select-Object PowerShell Cmdlet

Selects objects or object properties.

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 FirstLastUniqueSkip, and Index parameters. To select object properties, use the Property parameter. When you select properties, Select-Object returns new objects that have only the specified properties.

Example 1: Select objects by property

This example creates objects that have the Name, ID, and working set (WS) properties of process objects.

Get-Process | Select-Object -Property ProcessName, Id, WS

Select-Object (Microsoft.PowerShell.Utility) - PowerShell | Microsoft Docs

PowerShell

Comments

Leave a Comment

All fields are required. Your email address will not be published.