NAME
Test-DcsRecordingEndpointConnection
SYNOPSIS
Tests the connection to a local or remote SQL recording server.
SYNTAX
Test-DcsRecordingEndpointConnection -Server <Object> [ -Connection <String> ] [ -PipelineVariable <String> ]
Test-DcsRecordingEndpointConnection -RemoteServer <String> -DatabaseName <String> -UserName <String> -Password <String> [ -Connection <String> ] [ -PipelineVariable <String> ]
Test-DcsRecordingEndpointConnection -RemoteServer <String> -DatabaseName <String> -Credentials <PSCredential> [ -Connection <String> ] [ -PipelineVariable <String> ]
Test-DcsRecordingEndpointConnection -RemoteServer <String> -DatabaseName <String> -UseWindowsAuthentication [ -Connection <String> ] [ -PipelineVariable <String> ]
DESCRIPTION
Tests the connection to a local or remote SQL recording server. For the remote SQL Server, either Windows login or SQL login credentials are required.
PARAMETERS
- -Server<Object>
- ServerHostData object, Id, or computer name that identifies the local recording server.
-
- Required: true
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -Connection<String>
- Alias of the connection to the server group. If not specified, the default connection is used.
-
- Required: false
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -PipelineVariable<String>
-
- Required: false
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -RemoteServer<String>
- The hostname of the remote SQL Server.
-
- Required: true
- Position: 1
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -DatabaseName<String>
- Name of the SQL database.
-
- Required: true
- Position: 2
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -UserName<String>
- Username configured for the SQL Server login.
-
- Required: true
- Position: 3
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -Password<String>
- Password configured for the SQL Server login.
-
- Required: true
- Position: 4
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -Credentials<PSCredential>
- The PSCredential object containing user name and password for the remote SQL Recording Server. This object can be obtained by invoking the Windows PowerShell cmdlet Get-Credential. In this manner, credentials can be passed through the object instead of typing the credentials.
-
- Required: true
- Position: 3
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -UseWindowsAuthentication<SwitchParameter>
- Use this parameter to use Windows login credentials to authenticate.
-
- Required: true
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
INPUTS
OUTPUTS
string : String conveying the success or failure of the connection. "True" means a successful connection. "False" means a failed connection.
NOTES
This cmdlet replaces Test-DcsRecordingServerConnection. See also Set-DcsRecordingEndpointProperties to set the recording server, database, and credentials.
EXAMPLES
Test-DcsRecordingEndpointConnection -Server SSVVM03
The cmdlet Test-DcsRecordingEndpointConnection is invoked to test the connection to the local server named "SSVVM03".
True
Test-DcsRecordingEndpointConnection -RemoteServer "SQLServer -DatabaseName "DcsPerf" -UserName "SQLUser" -Password "SQLpw001!"
The cmdlet Test-DcsRecordingEndpointConnection is invoked to test the connection to the remote SQL server with the host name "SQLServer" and the SQL database named "DcsPerf". The SQL login credentials has the username "SQLUser" and password "SQLpw001!".
True
Test-DcsRecordingEndpointConnection -RemoteServer "SQLServer" -DatabaseName "DcsPerf" -Credentials $SQLCreds
The Windows PowerShell cmdlet Get-Credential is invoked to collect the credentials for the remote SQL recording server. When Get-Credential is invoked a dialog box opens and the username and password of the recording server can be entered in a secure manner. The credentials of the recording server are saved to the variable $SQLCreds.
cmdlet Get-Credential at command pipeline position 1 Supply values for the following parameters: Credential
Test-DcsRecordingEndpointConnection -RemoteServer "SQLServer" -DatabaseName "DcsPerf" -UseWindowsAuthentication
The cmdlet Test-DcsRecordingEndpointConnection is invoked to test the connection to the remote SQL server with the host name "SQLServer" and the SQL database named "SQLDatabase". The switch parameter "UseWindowsAuthentication" is included to use Windows login credentials to authenticate. The string "True" is returned meaning that the connection was successful.
True