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”}

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: