Skip to main content

Command referenceGet-Service

Get-Service command (Windows / PowerShell)

WindowsPowerShellsystembeginner

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 / optionMeaning
-NameSelect by service name with wildcards.
-DisplayNameSelect by user-facing display name.
-DependentServicesReturn services depending on the selected service.
-RequiredServicesReturn services required by it.
-ComputerNameQuery 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.

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.