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 }