Tries to open a specified connection.
Checks that the details in a DatabaseConnection object produced by the New-DevartSqlDatabaseConnection cmdlet can be used to connect to the specified database. If Test-DevartDatabaseConnection can’t connect to the database, it raises an error.
Test-DevartDatabaseConnection [-Connection] <object> [<CommonParameters>]
-Connection <object>
The DevartDatabaseConnectionInfo or connection string that identifies the connection to test.
Required? true
Position? 0
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the following common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, InformationAction, InformationVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see About CommonParameters.
System.Object
The DevartDatabaseConnectionInfo or connection string that identifies the connection to test.
System.Boolean (returns true on success and false otherwise)
---------- EXAMPLE 1 ----------
$connection = New-DevartSqlDatabaseConnection -Server $serverName -Database $database -UserName $userName -password $password
Test-DevartDatabaseConnection -Connection $connection