![]() |
Set-DtActivationCode |
This cmdlet sets the Double-Take activation code on the specified server. It also returns the Double-Take activation code validation information from the Get-DtActivationStatus cmdlet. For this cmdlet, the -ServiceHost could be your source or target server.
Set-DtActivationCode [-Code] <String[]> [-AdditionalCode] <String[]> [-ActivationKey] <String> [-ServiceHost] <Server> [<CommonParameters>]
Required? |
true |
Position? |
2 |
Accept Pipeline Input? |
true (ByPropertyName) |
Accept Wildcard Characters? |
false |
Required? |
false |
Position? |
named |
Accept Pipeline Input? |
true (ByPropertyName) |
Accept Wildcard Characters? |
false |
Required? |
false |
Position? |
named |
Accept Pipeline Input? |
true (ByPropertyName) |
Accept Wildcard Characters? |
false |
Required? |
true |
Position? |
1 |
Accept Pipeline Input? |
true (ByPropertyName) |
Accept Wildcard Characters? |
false |
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see about_CommonParameters. |
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. Then the activation code 1234567890abcdefghij1234 is applied to the server. The server returns the activation code information. The connections for the server object are then closed.
$DtServerObjectAlpha= New-DtServer -Name alpha -UserName domain\administrator -Password password
Set-DtActivationCode -ServiceHost $DtServerObjectAlpha -Code 1234567890abcdefghij1234
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 server information for the online activation process is returned. The output from the Get-DtOnlineActivationRequest cmdlet is piped directly to Request-DtOnlineActivation, which activates the license online, and then that output (from Request-DtOnlineActivation) is piped directory to Set-DtActivationCode to set the activation key on the server.The connections for the server object are then closed.
$DtServerObjectAlpha= New-DtServer -Name alpha -UserName domain\administrator -Password password
Get-DtOnlineActivationRequest -ServiceHost $DtServerObjectAlpha | Request-DtOnlineActivation | Set-DtActivationCode
Disconnect-DtServer -ServiceHost $DtServerObjectAlpha