Add-DPMRecoveryTarget

Add-DPMRecoveryTarget

Grants the DPM role permission to recover to a location.

Syntax

Parameter Set: Default
Add-DPMRecoveryTarget [-DpmRole] <DpmRole> [-RecoveryTargets] <TargetRecoveryItem[]> [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

The Add-DPMRecoveryTarget cmdlet grants the System Center 2012 – Data Protection Manager (DPM) role permission to recover to a location.

Parameters

-DpmRole<DpmRole>

Specifies a DPM role object. To obtain a DPM role object, use the Get-DPMRole cmdlet.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-RecoveryTargets<TargetRecoveryItem[]>

Specifies an array of target recovery items which consist of the instance of SQL Server and the folder to use for alternate instance recovery.

Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

false

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.

Notes

  • For more information, type "Get-Help Add-DPMRecoveryTarget -detailed".

Examples

Example 1: Grant a role permission to recover to a location

This example grants a DPM permission to recover to an instance of SQL Server.

The first command gets a DPM role named OpsMgrSQL and stores the result in the $Role variable.

The second command gets the recovery target for the role stored in the $Role variable, and stores the result in the $RecoveryTargetInstance variable.

The third command grants the DPM role stored in the $Role variable permission to recover to the target instance of SQL Server stored in the $RecoveryTargetInstance variable.

PS C:\> $Role = Get-DPMRole -Name "OpsMgrSQL"
PS C:\> $RecoveryTargetInstance = Get-DPMRecoveryTarget -DpmRole $Role -Type SQLInstance
PS C:\> Add-DPMRecoveryTarget -Role $Role -RecoveryTargets $RecoveryTargetInstance

Add-DPMRecoveryTarget

New-DPMRecoveryTarget

Get-DPMRecoveryTarget

Remove-DPMRecoveryTarget