NAME
Connect-DcsServer
SYNOPSIS
Creates a connection to a server in a server group. When a connection has been created, all servers in the server group can be managed.
SYNTAX
Connect-DcsServer [ -Connection <String> ] [ -PipelineVariable <String> ]
Connect-DcsServer -Server <String> [ -Connection <String> ] [ -PipelineVariable <String> ]
Connect-DcsServer -Server <String> -UserName <String> -Password <String> [ -Connection <String> ] [ -PipelineVariable <String> ]
Connect-DcsServer -Server <String> -Credential <PSCredential> [ -Connection <String> ] [ -PipelineVariable <String> ]
DESCRIPTION
Creates a connection to a server in a server group. When a connection has been created, all servers in the server group can be managed. If this cmdlet is invoked without parameters, a connection to the local host using default credentials will be established. This cmdlet can also be invoked to connect to a remote server using the default system credentials (when using PowerShell 3.0 and above).The last connection created is designated as the default connection unless Set-DcsDefaultConnection is invoked to set a specific connection to be the default. A connection is required for each PowerShell session. The Connection parameter is required to invoke all cmdlets and if not specifically designated, the default connection will be used.
PARAMETERS
- -Connection<String>
- Alias representing the connection to the server group. If other parameter values are specified, but the Connection parameter value is not specified, the server name will be used as the connection alias. If this cmdlet is invoked without parameters, a connection to the local host using default credentials will be established and the connection alias will be "localhost".
-
- 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
-
- -Server<String>
- Computer name or IP address of the server to connect to. The computer name must be unique or the name must be fully qualified.
-
- Required: true
- Position: 1
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -UserName<String>
- The user name of a registered user or the local administrator account. Operating system credentials are used to authenticate users. User names must match Windows operating system user accounts and must reside on all servers in the associated server group.
-
- Required: true
- Position: 2
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -Password<String>
- Login password that corresponds to the registered user name.
-
- Required: true
- Position: 3
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -Credential<PSCredential>
- The PSCredential object containing user name and password. This object can be obtained by invoking the Windows PowerShell cmdlet Get-Credential, see Example 2. In this manner, credentials can be passed through the object instead of typing the credentials.
-
- Required: true
- Position: 2
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
INPUTS
OUTPUTS
string : Alias for the connection.
NOTES
Also see Disconnect-DcsServer, Set-DcsDefaultConnection, Get-DcsDefaultConnection, Get-DcsConnection.
EXAMPLES
Connect-DcsServer -Server SSV1 -UserName administrator -Password Adminpw! -Connection SSV1Connect
Connects the server named "SSV1" with the UserName of "Administrator" and Password of "Adminpw!" with the connection named "SSV1Connect".
SSV1Connect
Connect-DcsServer -Server SSVVM1 -Credential(Get-Credential)
The cmdlet Connect-DcsServer is invoked to create a connection through the server named "SSVVM1" using the Credential parameter. The value is obtained by invoking the Windows PowerShell cmdlet Get-Credential. When Get-Credential is invoked a dialog box opens and the user name and password can be entered in a secure manner.
cmdlet Get-Credential at command pipeline position 1 Supply values for the following parameters: Credential
Connect-DcsServer
The cmdlet is invoked without parameters resulting in a connection to the local host using default credentials.
localhost
Connect-DcsServer -Server SSV5
The cmdlet Connect-DcsServer is invoked to create a connection through the remote server named "SSV5". When the credentials are not supplied, a connection using the default local machine credentials of the remote server will be attempted. A network connection must exist from the server connecting to the remote server.
localhost