VMware VCENTER CONFIGURATION MANAGER 5.3 - SOFTWARE CONTENT REPOSITORY TOOL GUIDE Podręcznik Użytkownika Strona 228

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 254
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 227
228 | Scripting
Sample 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\Ap
pRecovery 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
}
Przeglądanie stron 227
1 2 ... 223 224 225 226 227 228 229 230 231 232 233 ... 253 254

Komentarze do niniejszej Instrukcji

Brak uwag