Command library / Get-Process
Get-Process
List running processes as objects
Returns running processes as PowerShell objects (not text), so you can filter, sort or pipe them into other cmdlets. The name binds positionally — you rarely need to type -Name at all — and -Id looks up one exact process by its PID.
Practice Get-ProcessUsage
Get-Process [[-Name] <string>] [-Id <int>]
Options and flags
-NameNAMEprocess name, without .exe (first positional parameter)
-IdPIDexact process ID to look up
Examples
Get-Process chromeEvery process named chrome — the name binds positionally, no -Name needed.
Get-Process -Id 4444The exact process behind PID 4444.
Get-Process -Name svchostSame as the positional form, written explicitly.
Common mistakes
Get-Process -Id four Get-Process -Id 4444
-Id expects a number, not a word — PowerShell would reject 'four' as an invalid process ID.