Datei Präfix mit Hostnamen an XML File für Nutzung des Script mit mehreren Hosts hinzugefügt
This commit is contained in:
@ -87,16 +87,16 @@ function Test-XMLFile {
|
||||
}
|
||||
}
|
||||
|
||||
& 'C:\Program Files\Acronis\CommandLineTool\acrocmd.exe' list plans --host=$Server --credentials=$User,$Password --log=c:\tmp\AcronisBackupStatus.xml >$null | write-host
|
||||
& 'C:\Program Files\Acronis\CommandLineTool\acrocmd.exe' list plans --host=$Server --credentials=$User,$Password --log=c:\tmp\AcronisBackupStatus-$Server.xml >$null | write-host
|
||||
|
||||
$Data = New-Object xml
|
||||
$Data.psbase.PreserveWhitespace = $false
|
||||
|
||||
while ((Test-XMLFile "c:\tmp\AcronisBackupStatus.xml") -eq $false ) {
|
||||
while ((Test-XMLFile "c:\tmp\AcronisBackupStatus-$Server.xml") -eq $false ) {
|
||||
$null = Invoke-Expression -Command:$command
|
||||
}
|
||||
|
||||
$Data.Load("c:\tmp\AcronisBackupStatus.xml")
|
||||
$Data.Load("c:\tmp\AcronisBackupStatus-$Server.xml")
|
||||
|
||||
write-host "<prtg>"
|
||||
|
||||
|
Reference in New Issue
Block a user