Поделиться через


Update-DPMCredential

Update-DPMCredential

Updates a credential in DPM.

Syntax

Parameter Set: Default
Update-DPMCredential [-Name] <String> [-PSCredential] <PSCredential> [[-Description] <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

The Update-DPMCredential cmdlet updates a credential in System Center 2012 – Data Protection Manager (DPM).

Parameters

-Description<String>

Specifies a description for the credential.

Aliases

none

Required?

false

Position?

4

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Name<String>

Specifies the name of the credential to update.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PSCredential<PSCredential>

Specifies a credential for a user account that has permission to perform this operation. You can use Get-Credential to get a PSCredential object.

Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

true(ByValue)

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

Example 1: Update a credential

The first command creates a secure password, and then stores it in the $secpasswd variable.

The second command creates a PSCredential object, and then stores it in the $mycreds variable.

The third command updates the credential named DemoVMCredential.

PS C:\>  $secpasswd = ConvertTo-SecureString "PlainTextPassword" -AsPlainText -Force
PS C:\> $mycreds = New-Object System.Management.Automation.PSCredential ("username", $secpasswd)
PS C:\> Update-DPMCredential -Name "DemoVMCredential" -PSCredential $mycreds

Add-DPMCredential

ConvertTo-SecureString

Get-DPMCredential

New-Object

Remove-DPMCredential

Set-DPMCredentials