Click or drag to resize

Set-DtServerCredential

This cmdlet changes the credentials associated with the server object that has already been created using the New-DtServer cmdlet.

Syntax

Set-DtServerCredential [-Input] <Server> [-Credential] <PSCredential> [<CommonParameters>]

Parameters
-Input<Server>

Specify the name or IP address of the server, cluster, or cluster node, or specify the server object returned from the New-DtServer cmdlet.

Required?

true

Position?

named

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

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.

Required?

true

Position?

named

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see about_CommonParameters.

Examples

------------------EXAMPLE------------------

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 update the current credentials on the server alpha.

$DtCredentialEncrypted = Get-Credential

Set-DtServerCredential -Input alpha -Credential $DtCredential