[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]
Powershell Function to Get Statues of All Sql Related Services
by
Tags:
Leave a Reply