mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-24 06:05:17 +02:00
+ Fix hyperv node-snapshot
This commit is contained in:
parent
0419edde14
commit
40a835e133
@ -58,10 +58,14 @@ Try {
|
||||
if ($vm.status -imatch "Backing") {
|
||||
$VMDisks = Get-VMHardDiskDrive -VMName $vm.VMName
|
||||
Foreach ($VMDisk in $VMDisks) {
|
||||
if ($VMDisk.Path -imatch ".avhdx" -or $VMDisk.VhdType -imatch "Differencing") {
|
||||
$vhd = Get-VHD $VMDisk.Path
|
||||
$parent = Get-Item $vhd.ParentPath
|
||||
$VHD = Get-VHD $VMDisk.Path
|
||||
if ($VHD.Path -imatch ".avhdx" -or $VHD.VhdType -imatch "Differencing") {
|
||||
$parent = Get-Item $VHD.ParentPath
|
||||
if ($i -eq 0) {
|
||||
Write-Host "[name=" $vm.VMName "][state=" $vm.State "][note=" $note "]"
|
||||
}
|
||||
Write-Host "[checkpointCreationTime=" (get-date -date $parent.LastWriteTime -UFormat ' . "'%s'" . ') "]"
|
||||
$i=1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user