Add-DPMRecoveryTarget
Add-DPMRecoveryTarget
Grants the DPM role permission to recover to a location.
構文
Parameter Set: Default
Add-DPMRecoveryTarget [-DpmRole] <DpmRole> [-RecoveryTargets] <TargetRecoveryItem[]> [-Confirm] [-WhatIf] [ <CommonParameters>]
詳細説明
The Add-DPMRecoveryTarget cmdlet grants the System Center 2012 – Data Protection Manager (DPM) role permission to recover to a location.
パラメーター
-DpmRole<DpmRole>
Specifies a DPM role object. To obtain a DPM role object, use the Get-DPMRole cmdlet.
エイリアス |
none |
必須? |
true |
位置は? |
1 |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
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.
エイリアス |
none |
必須? |
true |
位置は? |
2 |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-Confirm
コマンドレットを実行する前に、ユーザーに確認を求めます。
必須? |
false |
位置は? |
named |
既定値 |
false |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-WhatIf
コマンドレットを実行するとどのような結果になるかを表示します。コマンドレットは実行されません。
必須? |
false |
位置は? |
named |
既定値 |
false |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
<CommonParameters>
このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。
入力
入力型は、コマンドレットにパイプできるオブジェクトの型です。
出力
出力型は、コマンドレットによって生成されるオブジェクトの型です。
注
- For more information, type "
Get-Help Add-DPMRecoveryTarget -detailed
".
例
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