Users Guide
表 314. VolumeNameCollection パラメータのオブジェクト
メソッド 説明
public override bool Equals(object obj) このインスタンスと指定されたオブジェクト(VolumeNameCollection オブジェクトで
あることも必要)が同じ値を持っているかどうかを判別します。
(Object.Equals(Object) をオーバーライドします。)
public override int GetHashCode() この VolumeNameCollection のハッシュコードを返します。(Object.GetHashCode() を
オーバーライドします。)
VolumeSnapshotInfo (namesapce Replay.Common.Contracts.Transfer)
次の表には、VolumeSnapshotInfo パラメータに使用可能なオブジェクトを示しています。
表 315. VolumeSnapshotInfo パラメータのオブジェクト
メソッド 説明
public Uri BlockHashesUri { get; set;} ボリュームブロックの MD5 ハッシュを読み取ることができる URI を取得または設定
します。
public Uri BlockDataUri { get; set;} ボリュームデータブロックを読み取ることができる URI を取得または設定します。
VolumeSnapshotInfoDictionary (namespace
Replay.Common.Contracts.Transfer)
パラメータ System.Collections.Generic.Dictionary<VolumeName, VolumeSnapshotInfo> から値を継承します。
PowerShell スクリプトのサンプル
管理ユーザーが PowerShell スクリプトを実行するのに役立つ次のサンプルスクリプトが提供されています。
PreTransferScript.ps1
PreTransferScript は、スナップショットの転送前に保護対象マシンで実行されます。
PreTransferScript のサンプル
# receiving parameter from transfer job
param([object]$TransferPrescriptParameter)
# building path to Agent's Common.Contracts.dll and loading this assembly
$regLM = [Microsoft.Win32.Registry]::LocalMachine
$regLM = $regLM.OpenSubKey('SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\AppRecovery
Agent 5')
$regVal = $regLM.GetValue('InstallLocation')
$regVal = $regVal + 'Common.Contracts.dll'
[System.Reflection.Assembly]::LoadFrom($regVal) | out-null
# Converting input parameter into specific object
$TransferPrescriptParameterObject = $TransferPrescriptParameter -as
[Replay.Common.Contracts.PowerShellExecution.TransferPrescriptParameter];
# Working with input object. All echo's are logged
if($TransferPrescriptParameterObject -eq $null) {
echo 'TransferPrescriptParameterObject parameter is null'
}
else {
echo 'TransferConfiguration:'$TransferPrescriptParameterObject.TransferConfiguration
echo 'StorageConfiguration:' $TransferPrescriptParameterObject.StorageConfiguration
}
スクリプトによる Rapid Recovery ジョブの拡張 447










