VMware VCENTER CONFIGURATION MANAGER 5.3 - SOFTWARE CONTENT REPOSITORY TOOL GUIDE Guide de l'utilisateur Page 227

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 254
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 226
Scripting | 227
PreTransferScript.ps1
The PreTransferScript is executed on the agent side prior to transferring a snapshot.
Sample 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\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
$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.TransferConfigu
ration
echo 'StorageConfiguration:'
$TransferPrescriptParameterObject.StorageConfiguration
}
PostTransferScript.ps1
The PostTransferScript is executed on the agent side after transferring a snapshot.
Vue de la page 226
1 2 ... 222 223 224 225 226 227 228 229 230 231 232 ... 253 254

Commentaires sur ces manuels

Pas de commentaire