From adb68d058f4dab89dde2076a74a100531841890c Mon Sep 17 00:00:00 2001 From: Wes Carroll Date: Thu, 21 Feb 2019 13:26:24 -0500 Subject: [PATCH] Fixed connection testing logic. --- ZertoApiWrapper/Private/Invoke-ZertoRestRequest.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ZertoApiWrapper/Private/Invoke-ZertoRestRequest.ps1 b/ZertoApiWrapper/Private/Invoke-ZertoRestRequest.ps1 index cf76386..b47b499 100644 --- a/ZertoApiWrapper/Private/Invoke-ZertoRestRequest.ps1 +++ b/ZertoApiWrapper/Private/Invoke-ZertoRestRequest.ps1 @@ -11,7 +11,7 @@ function Invoke-ZertoRestRequest { [switch]$returnHeaders ) $callerErrorActionPreference = $ErrorActionPreference - if ( -not (Test-Path variable:script:zvmServer -and Test-Path variable:script:zvmPort) ) { + if ( -not ((Test-Path variable:script:zvmServer) -and (Test-Path variable:script:zvmPort)) ) { Write-Error -Message "Zerto Connection does not Exist. Please run Connect-ZertoServer first to establish a connection" break }