+ Fix hyperv node-snapshot

This commit is contained in:
garnier-quentin 2017-05-10 15:34:01 +02:00
parent 74c4060b5a
commit 91091f8348

View File

@ -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
}
}
}