Powershell Script to check sql services Status

PS script to check all sql services status installed on machine :

get-service -displayname sql* -comp DESKTOP-02JIB76 |select-object -p status,name,displayname |Out-GridView

Below is the output Screenshot which shows all instances installed on the given machine:

PS script to get only running status of sql services :

get-service -displayname *sql*server*|findstr -i Running

Below screenshot shows only Running sql Services on your given machine :

PS script to get only Stopped status of sql services :

get-service -displayname *sql*server*|findstr -i stopped

Below screenshot shows only Stopped sql Services on your given machine :

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.