Powershell Command to get status of SQL Server services in a machine.
#to get stopped services
Get-Service -name *sql* | Where-object{$_.Status -eq "Stopped"} | Format-Table -AutoSize
#to get Running services
Get-Service -name *sql* | Where-object{$_.Status -eq "Running"} | Format-Table -AutoSize
No comments:
Post a Comment