Add-DPMRecoveryTarget

Grants the DPM role permission to recover to a location.

Syntax

Add-DPMRecoveryTarget
   [-DpmRole] <DpmRole>
   [-RecoveryTargets] <TargetRecoveryItem[]>
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

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

Examples

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

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

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

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

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

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DpmRole

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

Type:DpmRole
Position:1
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-RecoveryTargets

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

Type:TargetRecoveryItem[]
Position:2
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

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

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False