Synopsis

Tests for active sql connection.

Syntax

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

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

Description

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

Parameters

-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

<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).

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