Archive for the ‘get-service’ Tag

get-service show startup automatic and stopped

Sunday, December 22nd, 2019

Going through the learn powershell in 30 days. One test question was to display services with automattic startup and are stopped:

Get-Service | Select-Object -Property Name,Status,StartType | where-object {$_.Status -eq “Stopped” -and $_.StartType -eq “Automatic”}