+ add snapshost case
This commit is contained in:
parent
01ff8c68ae
commit
b688820251
|
@ -55,6 +55,16 @@ Try {
|
|||
$i=1
|
||||
}
|
||||
}
|
||||
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
|
||||
Write-Host "[checkpointCreationTime=" (get-date -date $parent.LastWriteTime -UFormat ' . "'%s'" . ') "]"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} Catch {
|
||||
Write-Host $Error[0].Exception
|
||||
|
|
Loading…
Reference in New Issue