Users Guide

Table Of Contents
샘플 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
}
PostTransferScript.ps1
PostTransferScript 스냅숏을 전송한 보호된 컴퓨터에서 실행됩니다.
샘플 PostTransferScript
# receiving parameter from transfer job
param([object] $TransferPostscriptParameter)
# 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
$TransferPostscriptParameterObject = $TransferPostscriptParameter -as
[Replay.Common.Contracts.PowerShellExecution.TransferPostscriptParameter];
# Working with input object. All echo's are logged
if($TransferPostscriptParameterObject -eq $null) {
echo 'TransferPostscriptParameterObject parameter is null'
}
else {
echo 'VolumeNames:' $TransferPostscriptParameterObject.VolumeNames
echo 'ShadowCopyType:' $TransferPostscriptParameterObject.ShadowCopyType
echo 'ForceBaseImage:' $TransferPostscriptParameterObject.ForceBaseImage
echo 'IsLogTruncation:' $TransferPostscriptParameterObject.IsLogTruncation
}
424 스크립트 작성을 사용하여 Rapid Recovery 작업 확장