Fixed connection testing logic.
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user