Get-SqlPort
Uses SQL-DMO to return the port number of the specified SQL Server.
Syntax
Get-SqlPort [-sqlserver] <String> [<CommonParameters>]
Detailed Description
The Get-SqlPort function uses SQL-DMO to return the port number of the specified SQL Server for the specified SQL server.
Related Commands
Parameters
Name |
Description |
Required? |
Pipeline Input |
Default Value |
sqlserver |
|
true |
false |
|
Input Type
None
You cannot pipe objects to Get-SqlPort
Return Values
System.Management.Automation.PSCustomObject
Get-SqlPort returns a System.Management.Automation.PSCustomObject object.
Examples
EXAMPLE 1
Get-SqlPort "Z002\sql2k8" "pubs"
This command returns SQL port information for the Z002\sql2k8 SQL Server.