AD | Application | AWS | Azure | Cloud | Database | Enterprise | Environmental | Event Log | File System | IoT | IT Service | Network/System | NIS2 | Infra | Performance | Protocol | SaaS | Security | Service Level | Storage | Linux | VMware | VoIP | Web | Wireless | SNMP

MonitorTools.com » Administration » Powershell » Powershell 1.0 » Select-Object

Select-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 »

Select-Object

Description
Select properties of objects.

Usage


Options


Example(s)
Display only the name, ID and Working Set(WS) properties of Get-Process:

PS C:\>get-process | select-object ProcessName,Id,WS

Display only the Name and modules properties of Get-Process, use -ExpandProperty to display the details contained within the modules property:

PS C:\>get-process | select-object ProcessName -expandproperty modules | format-list

Display the 5 processes that are using the most memory (WS=Working Set):

PS C:\>get-process | sort-object -property WS | select-object -Last 5

Display the name and claculate the start day of the processes running:

PS C:\>get-process | select-object ProcessName,@{Name="Start Day"; Expression={$_.StartTime.DayOfWeek}}


M