Get-Service
Use Get-Service to get objects that represent services on a Windows computer, including running and stopped services.
- Cmdlet
Get-Service - Parameter
-Name - Value
"WinRM" - Pipeline
| - Cmdlet
Where-Object - Script block
{ $_.Status -eq 'Running' }
Documentation: Microsoft Learn — get-service
What it does
Use Get-Service to get objects that represent services on a Windows computer, including running and stopped services.
Syntax
Windows PowerShell 5.1 only: PowerShell 7 removed the -ComputerName parameter. To query services on another Windows host from PowerShell 7, use a supported remoting session instead of a Windows PowerShell-only example.
PS> Get-Service -ComputerName "SERVER01" -Name "WinRM" # -ComputerName works in Windows PowerShell 5.1.
PS> Invoke-Command -ComputerName "SERVER01" {
>> Get-Service -Name "WinRM"
>> }
# PowerShell 7 removed -ComputerName from Get-Service.
# Query the remote host through a remoting session instead.
See the command anatomy
Inspect this authored example with fictional data in the bounded browser model. The numbered stages show how its objects change.
Get-Service | Where-Object Status -eq Stopped- Stage 1Get-Service
Positional values or no named parameters - Stage 2Where-Object
-eq
Try it
Browser simulation · fictional data; no changes to your computer.
Follow the objects
Run the command to inspect each stage.
Examples
Get all services
Show reference output
Illustrative output · values vary by environment
Name Status StartType DisplayName -------- ------- --------- --------------------------------------- BITS Running Manual Background Intelligent Transfer Service Dnscache Running Automatic DNS Client EventLog Running Automatic Windows Event Log Spooler Running Automatic Print Spooler W32Time Running Manual Windows Time WinRM Stopped Manual Windows Remote Management wuauserv Running Manual Windows Update
Get one service by name
Show reference output
Illustrative output · values vary by environment
Name Status StartType DisplayName ------- ------- --------- ------------- Spooler Running Automatic Print Spooler
Keep only stopped services
Show reference output
Illustrative output · values vary by environment
Name Status StartType DisplayName ----- ------- --------- ------------------------- WinRM Stopped Manual Windows Remote Management
Read service state without changing it
Get-Service returns Windows service objects. -Name matches the service name; -DisplayName matches the longer label shown in Services. Use the appropriate parameter instead of guessing which name an administrator supplied.
Stopped does not mean broken
A stopped service may be intentionally manual, disabled or triggered on demand. Compare its startup configuration and the application's requirements before deciding it needs to start.
Remote and platform limits
The command is Windows-specific. PowerShell 7 removed its -ComputerName parameter: use a supported remoting session to run it on another Windows host rather than copying a Windows PowerShell-only example.
Keep the objects while filtering and selecting. Format the final display at the end; pass the original objects to an export if you need a report.
Filter services by status · Choose report properties
Updated 1 October 2026. Browser outputs are fictional; check the installed module help for your environment.