VMware VCENTER CONFIGURATION MANAGER 5.3 - SOFTWARE CONTENT REPOSITORY TOOL GUIDE Guía de usuario Pagina 231

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 254
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 230
Scripting | 231
PreNightlyJobScript.ps1
The PreNightlyJobScript is executed before every nighty job on Core side. It has
$JobClassName parameter, that helps to handle those child jobs separately.
Sample PreNightlyJobScript
# receiving parameters from Nightlyjob
param([System.String]$JobClassMethod ,
[object]$NightlyAttachabilityJobRequest, [object]$RollupJobRequest,
[object]$Agents, [object]$ChecksumCheckJobRequest,
[object]$TransferJobRequest, [int]$LatestEpochSeenByCore)
# 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
# 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 {
$NightlyAttachabilityJobRequestObject =
$NightlyAttachabilityJobRequest -as
[Replay.Core.Contracts.Sql.NightlyAttachabilityJobRequest];
echo 'Nightly Attachability job results:';
if($NightlyAttachabilityJobRequestObject -eq $null) {
echo 'NightlyAttachabilityJobRequestObject parameter is null';
}
else {
Vista de pagina 230
1 2 ... 226 227 228 229 230 231 232 233 234 235 236 ... 253 254

Comentarios a estos manuales

Sin comentarios