If I run it in a regular cmd-window it works fine, but when i run it in PowerShell i get the error "Validation Failed"
Anyone who can spot any problem with this?
Iv'e tried different way to run Veeam.Backup.Validator.exe from PowerShell.
This is the script I'm running
Code: Select all
Add-PSSnapIn VeeamPSSNapin
$Jobs = Get-VBRJob |where {$_.Name -match "Test"}
$OutputFile = "c:\temp\VeeamValidation.html"
Set-Location "C:\Program Files\Veeam\Backup and Replication\Backup\"
foreach ($Job in $Jobs) {
$JobName = $Job.Name
if ($Job.IsRunning -eq $true) {
Write-Host $JobName "is running"
Continue
}
.\Veeam.Backup.Validator.exe /backup:"$JobName" /format:html /report:"$OutputFile"
}
Code: Select all
Veeam Backup Validator Version 9.5.0.0
Copyright (C) Veeam Software AG. All rights reserved.
File c:\temp\VeeamValidation.html will be overwritten
Parameters:
Backup ID: {88BD0031-1CC0-4843-BD83-05A5AB07F09B}
Backup name: test-job2
Format: Html
Restore point date: den 10 februari 2017
Restore point ID: {DC01ED40-A467-45DA-8D2F-7E8D16701352}
Restore point time: 08:19:42
Report: c:\temp\VeeamValidation.html
Silence: no
Skip: no
Validating...
Validating VM...
VM name: wps2730845
Creation time: 2017-02-10 08:20:06
Backup type: full
Platform: VMware
OS name: Microsoft Windows Server 2012 (64-bit)
Reading VM summary...
Storage path: C:\temp\backup\test-job2\test-job2D2017-02-10T081942.vbk
wps2730845.vmx (3,5 KB)
wps2730845.vmxf (265,0 B)
wps2730845.nvram (8,5 KB)
wps2730845.vmdk (604,0 B)
wps2730845-flat.vmdk (50,0 GB)
FsAwareMeta:92d64e45-913d-49be-a9d8-9596a4264ac2:2000 (0,0 B)
Skipping VM 'wps2730845': VM is unavailable.
Statistic:
VM count: 1
Incomplete VM count: 0
Failed VM count: 1
Files count: 1
Total size: 3,5 KB
.\Veeam.Backup.Validator.exe : Validation failed.
At line:18 char:5
+ .\Veeam.Backup.Validator.exe /backup:"$JobName" /format:html /rep ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (Validation failed.:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
The following VMs are corrupted:
1. 'wps2730845': VM is unavailable.
And this is the output from when I run it in CMD
Code: Select all
C:\Program Files\Veeam\Backup and Replication\Backup>Veeam.Backup.Validator.exe /backup:"test-job2"
Veeam Backup Validator Version 9.5.0.0
Copyright (C) Veeam Software AG. All rights reserved.
Parameters:
Backup ID: {88BD0031-1CC0-4843-BD83-05A5AB07F09B}
Backup name: test-job2
Format: Html
Restore point date: den 10 februari 2017
Restore point ID: {DC01ED40-A467-45DA-8D2F-7E8D16701352}
Restore point time: 08:19:42
Report:
Silence: no
Skip: no
Validating...
Validating VM...
VM name: wps2730845
Creation time: 2017-02-10 08:20:06
Backup type: full
Platform: VMware
OS name: Microsoft Windows Server 2012 (64-bit)
Reading VM summary...
Storage path: C:\temp\backup\test-job2\test-job2D2017-02-10T081942.vbk
wps2730845.vmx (3,5 KB)
wps2730845.vmxf (265,0 B)
wps2730845.nvram (8,5 KB)
wps2730845.vmdk (604,0 B)
wps2730845-flat.vmdk (50,0 GB)
FsAwareMeta:92d64e45-913d-49be-a9d8-9596a4264ac2:2000 (0,0 B)
Validating wps2730845.vmx
████████████████████████████████████████████████████████████████████████
Validating wps2730845.vmxf
████████████████████████████████████████████████████████████████████████
Validating wps2730845.nvram
████████████████████████████████████████████████████████████████████████
Validating wps2730845.vmdk
████████████████████████████████████████████████████████████████████████
Validating wps2730845-flat.vmdk
████████████████████████████████████████████████████████████████████████
Validating FsAwareMeta:92d64e45-913d-49be-a9d8-9596a4264ac2:2000
████████████████████████████████████████████████████████████████████████
Statistic:
VM count: 1
Incomplete VM count: 0
Failed VM count: 0
Files count: 6
Total size: 50,0 GB
Validation completed successfully.