Update VMware.HV.Helper.psm1
Added per feedback
This commit is contained in:
@@ -11545,11 +11545,13 @@ function Set-HVInstantCloneMaintenance {
|
|||||||
Set-Annotation -Entity (Get-VMHost -Name $VMHost) -CustomAttribute "InstantClone.Maintenance" -Value "1" | Out-Null
|
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") {
|
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
|
Start-Sleep -Seconds 10
|
||||||
}
|
}
|
||||||
} elseif ($Disable) {
|
} elseif ($Disable) {
|
||||||
if (-not (Get-Annotation -Entity (Get-VMHost -Name $VMHost) -CustomAttribute "InstantClone.Maintenance").Value -eq "") {
|
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
|
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
|
Set-VMhost $VMHost -State Connected | Out-Null
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user