PsSqlClient

The PowerShell SQL Client module aims to replace to the SQL Server utilities SQLCMD and BCP

View the Project on GitHub abbgrade/PsSqlClient

Test-TSqlConnection

SYNOPSIS

SYNTAX

Test-TSqlConnection [[-Connection] <SqlConnection>] [-Reconnect] [<CommonParameters>]

DESCRIPTION

EXAMPLES

Example 1

PS C:\> 

PARAMETERS

-Connection

Type: SqlConnection
Parameter Sets: (All)
Aliases:

Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Reconnect

Tries a reconnect on negative connection test.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

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

INPUTS

Microsoft.Data.SqlClient.SqlConnection

OUTPUTS

System.Boolean

NOTES