This project is read-only.


Tests for active sql connection.


Test-SqlConnection [[-ConnectionName] <String>] [<CommonParameters>]

Test-SqlConnection -All <SwitchParameter> [<CommonParameters>]


Tests for active sql connection. ‘All’ switch will see if there are any connections active.


-ConnectionName <String>

User defined name for connection.

Required? False
Position? 0
Default value Default
Accept pipeline input? true (ByValue)
Accept wildcard characters? False

-All <SwitchParameter>

Will return true if there are any connections, false if no connections.

Required? True
Position? named
Default value  
Accept pipeline input? false
Accept wildcard characters? False


This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (

Last edited Jun 23, 2015 at 2:30 PM by mastertook, version 2