From f0279633dd86a521b6fdad365afdc9e6285374b9 Mon Sep 17 00:00:00 2001 From: Brownstein Date: Fri, 28 Aug 2020 13:43:22 -0400 Subject: [PATCH] add missing .IsPresent for switch value --- ZertoApiWrapper/Public/Invoke-ZertoMove.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ZertoApiWrapper/Public/Invoke-ZertoMove.ps1 b/ZertoApiWrapper/Public/Invoke-ZertoMove.ps1 index 6ea5d04..a63bb98 100644 --- a/ZertoApiWrapper/Public/Invoke-ZertoMove.ps1 +++ b/ZertoApiWrapper/Public/Invoke-ZertoMove.ps1 @@ -84,7 +84,7 @@ function Invoke-ZertoMove { reverseProtection = -not $disableReverseProtection.IsPresent } - if ( $keepSourceVms -and -not $disableReverseProtection ) { + if ( $keepSourceVms.IsPresent -and -not $disableReverseProtection.IsPresent ) { Write-Verbose 'Disabling reverse protection as keepSourceVms requires it' $body['reverseProtection'] = $false }