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

  • 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 233
234 | Scripting
}
}
PostNightlyJobScript.ps1
The PostNightlyJobScript is executed after every nighty job on Core side. It has
$JobClassName parameter, that helps to handle those child jobs separately.
Sample PostNightlyJobScript
# receiving parameters from Nightlyjob
param([System.String]$JobClassMethod ,
[object]$NightlyAttachabilityJobRequest, [object]$RollupJobRequest,
[object]$Agents, [object]$ChecksumCheckJobRequest,
[object]$TransferJobRequest, [int]$LatestEpochSeenByCore,
[object]$TakeSnapshotResponse)
# 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
$regVal2 = $regLM.GetValue('InstallLocation')
$regVal2= $regVal2 + 'CoreService\Core.Contracts.dll'
[System.Reflection.Assembly]::LoadFrom($regVal2) | out-null
# Nightlyjob has four child jobs: NightlyAttachability Job, Rollup Job,
Checksum Check Job and Log Truncation Job. All of them are triggering the
script, and $JobClassMethod (contain job name that calls the script) helps
to handle those child jobs separately
switch ($JobClassMethod) {
# working with NightlyAttachability Job
NightlyAttachabilityJob {
Vue de la page 233
1 2 ... 229 230 231 232 233 234 235 236 237 238 239 ... 253 254

Commentaires sur ces manuels

Pas de commentaire