Powershell Function to Get Statues of All Sql Related Services

[sourcecode language=”powershell” wraplines=”false”]
#Get SQL-related services’ statuses on a specific computer
#Usage: Get-SqlServiceStatus [ServerName]
Function Get-SQLServiceStatus
{
param ([string]$ComputerName=$env:computername)
Get-Service -ComputerName $ComputerName -Name "*sql*"
}
[/sourcecode]


Posted

in

by

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *