Command referenceGet-Service
Get-Service command (Windows / PowerShell)
What it does
Retrieve service controller objects and current service states. Guides covering the get-service powershell usually need pipeline-friendly examples, common parameters, and how the cmdlet compares with classic CMD or Linux tools. This page includes syntax, options, and copyable PowerShell examples.
Retrieve service controller objects and current service states.
Syntax
Get-Service [[-Name] <String[]>] [-DependentServices] [-RequiredServices] | Get-Service -DisplayName <String[]>
Common options
| Flag / option | Meaning |
|---|---|
| -Name | Select by service name with wildcards. |
| -DisplayName | Select by user-facing display name. |
| -DependentServices | Return services depending on the selected service. |
| -RequiredServices | Return services required by it. |
| -ComputerName | Query another computer in Windows PowerShell. |
Practical examples
All services
Get-Service
Lists local service objects.
Running services
Get-Service | Where-Object Status -eq Running
Selects currently running services.
Dependencies
Get-Service -Name WinRM -RequiredServices
Shows services required by WinRM.
Linux ↔ Windows equivalent
Closest match: systemctl (Linux / bash / sh / zsh). Control and inspect services and other systemd units.
Common mistakes
- Confusing service Name with DisplayName.
- Assuming Get-Service changes state; use Start-Service, Stop-Service, or Restart-Service.
Related commands
- Where-ObjectFilter pipeline objects by property values or a script block predicate.
- Get-ProcessRetrieve local or remote process objects and resource metrics.
- systemctlControl and inspect services and other systemd units.
- exportMark shell variables for inheritance by child processes.
- setDisplay, create, or remove CMD environment variables.
- shutdownShut down, restart, sign out, or schedule power actions.
- dateDisplay or format the system date and time.
- journalctlQuery and follow logs stored by the systemd journal.
FAQ
What does Get-Service do in PowerShell?
Retrieve service controller objects and current service states.
How can I see examples for Get-Service?
Run `Get-Help Get-Service -Examples`, then adapt an example to the provider and objects you are using.
What is a practical Get-Service example?
Try `Get-Service` — Lists local service objects.
Does Get-Service return text or objects?
Get-Service normally participates in PowerShell's object pipeline; formatting seen in the console is a view of those objects.
Browse the full Linux and Windows command reference to search more bash, CMD, PowerShell, Conda, and GitHub CLI commands.