Get-Sql
Uses WMI to list all of the SQL Server related services along with the service state and service account.
Syntax
Get-Sql [-computername] <String> [<CommonParameters>]
Detailed Description
The Get-Sql function uses WMI to list all of the SQL Server related services running on the specified computer along with the service state and service account.
Related Commands
Parameters
Name |
Description |
Required? |
Pipeline Input |
Default Value |
computername |
|
true |
false |
|
Input Type
None
You cannot pipe objects to Get-Sql
Return Values
System.Management.Automation.PSCustomObject
Get-Sql returns a System.Management.Automation.PSCustomObject object.
Examples
EXAMPLE 1
Get-Sql "Z002"
This command returns SQL service information for the Z002 Server.