Herunterladen Inhalt Inhalt Diese Seite drucken

Postnightlyjobscript.ps1 - Dell DL4300 Benutzerhandbuch

Vorschau ausblenden Andere Handbücher für DL4300:
Inhaltsverzeichnis

Werbung

[Replay.Core.Contracts.Transfer.TransferJobRequest];
echo 'Transfer job results:';
if($TransferJobRequestObject -eq $null) {
echo 'TransferJobRequestObject parameter is null';
}
else {
echo 'TransferConfiguration:'
$TransferJobRequestObject.TransferConfiguration;
echo 'StorageConfiguration:'
$TransferJobRequestObject.StorageConfiguration;
}
echo 'LatestEpochSeenByCore:' $LatestEpochSeenByCore;
break;
}
}

Postnightlyjobscript.ps1

Das PostNightlyJobScript wird auf der Kernseite nach jeder nächtlichen Aufgabe ausgeführt. Es trägt den
Parameter $JobClassName, der bei der separaten Behandlung von solch untergeordneten Aufgaben hilft.
# receiving parameters from Nightlyjob
param([System.String]$JobClassMethod , [object]
$NightlyAttachabilityJobRequest,
[object]$ChecksumCheckJobRequest,
$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
\AppRecovery 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 {
$NightlyAttachabilityJobRequestObject = $NightlyAttachabilityJobRequest
-as
[Replay.Core.Contracts.Sql.NightlyAttachabilityJobRequest];
echo 'Nightly Attachability job results:';
if($NightlyAttachabilityJobRequestObject -eq $null) {
echo 'NightlyAttachabilityJobRequestObject parameter is null';
}
else {
echo 'AgentId:' $NightlyAttachabilityJobRequestObject.AgentId;
echo 'IsNightlyJob:'
$NightlyAttachabilityJobRequestObject.IsNightlyJob;
}
[object]$RollupJobRequest, [object]$Agents,
[object]$TransferJobRequest, [int]
197

Werbung

Inhaltsverzeichnis
loading

Diese Anleitung auch für:

Dl4000

Inhaltsverzeichnis