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


Add-DPMCredential

Add-DPMCredential

Adds a credential to DPM.

Syntax

Parameter Set: Default
Add-DPMCredential [-Name] <String> [-PSCredential] <PSCredential> [[-Description] <String> ] [ <CommonParameters>]

Detailed Description

The Add-DPMCredential cmdlet adds a credential to System Center 2012 – Data Protection Manager (DPM). You can use this credential to authenticate a VMware Server.

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 a name for the credential.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PSCredential<PSCredential>

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

Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

true(ByValue)

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: Add a credential

The first command connects to the specified DPM Server.

The second command constructs a password, and then stores it in the $secpasswd variable.

The third command creates a credential objet, and then stores it in the $mycreds variable.

The last command adds the credential named DemoVMCredential to the DPM server.

PS C:\>  Connect-DPMServer [-DPMServerName] <server_name>
PS C:\> $secpasswd = ConvertTo-SecureString "PlainTextPassword" -AsPlainText -Force
PS C:\> $mycreds = New-Object System.Management.Automation.PSCredential ("username", $secpasswd)
PS C:\> Add-DPMCredential -Name "DemoVMCredential" -PSCredential $mycreds -Description "add credential"

Connect-DPMServer

ConvertTo-SecureString

Get-DPMCredential

New-Object

Remove-DPMCredential

Set-DPMCredentials

Update-DPMCredential