From 80385d5475feb321f1fb23755c146aa0ac8e9145 Mon Sep 17 00:00:00 2001 From: Wes Carroll Date: Fri, 22 Feb 2019 12:02:57 -0500 Subject: [PATCH] Pause when uninstalling more than 1 VRA Initiate a pause when uninstalling more than one vra. Without this pause, the uninstall process would only be successful for 1 VRA. --- ZertoApiWrapper/Public/Uninstall-ZertoVra.ps1 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ZertoApiWrapper/Public/Uninstall-ZertoVra.ps1 b/ZertoApiWrapper/Public/Uninstall-ZertoVra.ps1 index 6775e5f..c2864a2 100644 --- a/ZertoApiWrapper/Public/Uninstall-ZertoVra.ps1 +++ b/ZertoApiWrapper/Public/Uninstall-ZertoVra.ps1 @@ -15,6 +15,9 @@ function Uninstall-ZertoVra { $vraIdentifier = get-zertovra -vraName $vraName | Select-Object vraIdentifier -ExpandProperty vraIdentifier $uri = "{0}/{1}" -f $baseUri, $vraIdentifier.toString() Invoke-ZertoRestRequest -uri $uri -method "DELETE" + if ($hostName.Count -gt 1) { + Start-Sleep 1 + } } }