Cmdlets > New-DtServer

New-DtServer

Creates a server object

Syntax

New-DtServer [-Name] <String> [[-UserName] <String>] [[-Password] <String>] [-Role <String>] [<CommonParameters>]

 

New-DtServer [-Name] <String> -Credential <PSCredential> [-Role <String>] [<CommonParameters>]

 

Detailed Description

This cmdlet creates a server object with specific credentials associated with it. This may be any type of server in your organization, for example a Double-Take server, a DNS server, an application server, and so on. This object is used to communicate with the Double-Take Management Service. You should close the connections to this server object when you are finished using it by using Disconnect-DtServer.

Parameters

Name Type Description Required Pipeline Input
Name String

Specify the name or IP address of the server, cluster, or cluster node.

true false
UserName String

Specify a user name. If you are using a domain, specify domain\user name.

true

false
Password String

Specify the password associated with the user you have entered. This password will be visible in plain text.

true false
Role String

Specify one of the following roles for the server object you are creating. These servers are used when you specify the -OtherServers parameter in other cmdlets.

  • TargetVimServer—This is the ESX server or vCenter that will host the replica virtual machine after failover. If you are using vCenter, specify your vCenter. Only specify an ESX host if you are using ESX standalone.
  • ReverseVimServer—This is the ESX server or vCenter server that will host the replica virtual after reverse and failover. If you are using vCenter, specify your vCenter. Only specify an ESX host if you are using ESX standalone.
  • ReverseHelperRole—This is the target where data will be replicated after a reverse.
false false
Credential PSCredential

Specify the credential object returned from the Windows PowerShell Get-Credential cmdlet. This password will not be visible because Windows stores an encrypted password. See Hiding your password in a PowerShell script for basic details on using this cmdlet. See your Windows PowerShell documentation for detailed instructions.

true false

Outputs

Server

Examples

$DtServerObjectAlpha= New-DtServer -Name alpha -UserName domain\administrator -Password password

Disconnect-DtServer -ServiceHost $DtServerObjectAlpha

A server object is created for the server alpha using the domain\administrator and password credentials. It assigns the server object to the variable called DtServerObjectAlpha. The connections for the server object are then closed.

 

$DtCredentialEncrypted = Get-Credential

$DtServerObjectAlpha = New-DtServer -Name alpha -Credential $DtCredential

Disconnect-DtServer -ServiceHost $DtServerObjectAlpha

User credentials are stored in a variable called $DtCredential. The script will prompt you to supply the username and password and the credentials will be encrypted. Then the stored credentials are used to create a new server object for the server alpha. It assigns the server object to the variable called DtServerObject. The connections for the server object are then closed.