Herunterladen Inhalt Inhalt Diese Seite drucken

Posttransferscript.ps1; Preexportscript.ps1 - Dell PowerVault DL4000 Benutzerhandbuch

Backup to disk-gerät
Vorschau ausblenden Andere Handbücher für PowerVault DL4000:
Inhaltsverzeichnis

Werbung

Posttransferscript.ps1

Das PostTransferScript wird auf der Agentenseite nach Übertragung eines Snapshots ausgeführt.
# 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
'IsLogTruncation:' $TransferPostscriptParameterObject.IsLogTruncation
}

Preexportscript.ps1

Das PreExportScript wird auf der Kernseite vor einer Exportaufgabe ausgeführt.
# receiving parameter from export job
param([object]$ExportJobRequest)
# building path to Core's Common.Contracts.dll and loading this assembly
$regLM = [Microsoft.Win32.Registry]::LocalMachine$regLM =
$regLM.OpenSubKey('SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
\AppRecovery Core 5')
$regVal = $regLM.GetValue('InstallLocation')
$regVal = $regVal + 'CoreService\Common.Contracts.dll'
[System.Reflection.Assembly]::LoadFrom($regVal) | out-null
# Converting input parameter into specific object
$ExportJobRequestObject = $ExportJobRequest -as
[Replay.Core.Contracts.Export.ExportJobRequest]
# Working with input object. All echo's are logged
if($ExportJobRequestObject -eq $null) {
echo
201

Werbung

Inhaltsverzeichnis
loading

Inhaltsverzeichnis