Command library / Get-Service
Get-Service
List Windows services and their status
Returns Windows services as objects, each with a Status (Running/Stopped), Name and DisplayName. The short internal Name binds positionally; DisplayName supports wildcards for searching by the friendly name you'd see in services.msc.
Practice Get-ServiceUsage
Options and flags
-NameNAMEthe service's short internal name (first positional parameter)
-DisplayNamePATTERNsearch by the friendly display name — supports wildcards like *SQL*
Examples
Get-Service wuauservIs Windows Update currently running or stopped?
Get-Service -Name spoolerSame idea, explicit parameter — the print spooler's status.
Get-Service -DisplayName "*SQL*"Find every service whose friendly name mentions SQL, without knowing its exact internal name.
Common mistakes
Without wildcards, -DisplayName must match the ENTIRE display name exactly — add * on both sides to search for a word inside the name.