Update VMware.HV.Helper.psm1

Added per feedback
This commit is contained in:
Jack McMichael
2018-12-04 14:05:08 -07:00
parent c7a19c795e
commit cea57f11d5

View File

@@ -11545,11 +11545,13 @@ function Set-HVInstantCloneMaintenance {
Set-Annotation -Entity (Get-VMHost -Name $VMHost) -CustomAttribute "InstantClone.Maintenance" -Value "1" | Out-Null
}
while ((Get-Annotation -Entity (Get-VMHost -Name $VMHost) -CustomAttribute "InstantClone.Maintenance").Value -ne "2") {
Write-Host "Instant Clone Maintenance Mode: Enabling for $VMHost...(This could take some time)"
Start-Sleep -Seconds 10
}
} elseif ($Disable) {
if (-not (Get-Annotation -Entity (Get-VMHost -Name $VMHost) -CustomAttribute "InstantClone.Maintenance").Value -eq "") {
Set-Annotation -Entity (Get-VMHost -Name $VMHost) -CustomAttribute "InstantClone.Maintenance" -Value "" | Out-Null
Write-Host "Instant Clone Maintenance Mode: Disabling for $VMHost"
}
Set-VMhost $VMHost -State Connected | Out-Null
}