Share via


Add-DPMRecoveryTarget

Grants the DPM role permission to recover to a location.

Syntax

Default (Default)

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.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DpmRole

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

Parameter properties

Type:DpmRole
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:

TargetRecoveryItem[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:2
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

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

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

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