PowerShell Genie

Get-Service

Use Get-Service to get objects that represent services on a Windows computer, including running and stopped services.

Get-Service -Name "WinRM" | Where-Object { $_.Status -eq 'Running' }
  • CmdletGet-Service
  • Parameter-Name
  • Value"WinRM"
  • Pipeline|
  • CmdletWhere-Object
  • Script block{ $_.Status -eq 'Running' }
Command 2 min read Windows PowerShell 5.1 and PowerShell 7

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

1PS> Get-Service [[-Name] <string[]>] [-ComputerName <String[]>] [-DependentServices] [-RequiredServices] [-Include <String[]>] [-Exclude <String[]>] [<CommonParameters>]

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.
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
  1. Stage 1Get-ServicePositional values or no named parameters
  2. Stage 2Where-Object-eq

    Try it

    Windows PowerShell

    Browser simulation · fictional data; no changes to your computer.

    Interactive simulation · fictional data

    Examples

    Get all services

    1PS> Get-Service
    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

    1PS> Get-Service -Name Spooler
    Show reference output

    Illustrative output · values vary by environment

    Name     Status   StartType  DisplayName  
    -------  -------  ---------  -------------
    Spooler  Running  Automatic  Print Spooler

    Keep only stopped services

    1PS> Get-Service | Where-Object Status -eq Stopped
    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.