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

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 254
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 228
Scripting | 229
PreExportScript.ps1
The PreExportScript is executed on the Core side prior to any export job.
Sample PreExportScript
# 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\Ap
pRecovery 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 'ExportJobRequestObject parameter is null'
}
else {
echo 'Location:' $ExportJobRequestObject.Location
echo 'Priority:' $ExportJobRequestObject.StorageConfiguration
}
Przeglądanie stron 228
1 2 ... 224 225 226 227 228 229 230 231 232 233 234 ... 253 254

Komentarze do niniejszej Instrukcji

Brak uwag