diff --git a/ZertoApiWrapper/Public/Get-ZertoVirtualizationSite.ps1 b/ZertoApiWrapper/Public/Get-ZertoVirtualizationSite.ps1 index af9013f..fa8124d 100644 --- a/ZertoApiWrapper/Public/Get-ZertoVirtualizationSite.ps1 +++ b/ZertoApiWrapper/Public/Get-ZertoVirtualizationSite.ps1 @@ -50,7 +50,7 @@ function Get-ZertoVirtualizationSite { "devices" { foreach ( $id in $siteIdentifier ) { - if ( $PSBoundParameters.Contains( "hostIdentifier" ) ) { + if ( $PSBoundParameters.ContainsKey( "hostIdentifier" ) ) { $uri = "{0}/{1}/devices?hostIdentifier={2}" -f $baseUri, $siteIdentifier, $hostIdentifier } else { $uri = "{0}/{1}/devices" -f $baseUri, $siteIdentifier @@ -61,7 +61,7 @@ function Get-ZertoVirtualizationSite { } "hosts" { - if ( $PSBoundParameters.Contains( "hostIdentifier" ) ) { + if ( $PSBoundParameters.ContainsKey( "hostIdentifier" ) ) { $uri = "{0}/{1}/hosts/{2}" -f $baseUri, $siteIdentifier, $hostIdentifier } else { $uri = "{0}/{1}/hosts" -f $baseUri, $siteIdentifier diff --git a/ZertoApiWrapper/Public/Get-ZertoVpg.ps1 b/ZertoApiWrapper/Public/Get-ZertoVpg.ps1 index 63d0ae1..a08c33b 100644 --- a/ZertoApiWrapper/Public/Get-ZertoVpg.ps1 +++ b/ZertoApiWrapper/Public/Get-ZertoVpg.ps1 @@ -74,7 +74,7 @@ function Get-ZertoVpg { "checkpoints" { $filter = $false - if ( $PSBoundParameters.Contains("startDate") -or $PSBoundParameters.Contains("endDate") ) { + if ( $PSBoundParameters.ContainsKey("startDate") -or $PSBoundParameters.ContainsKey("endDate") ) { $filter = $true $filterTable = @{} foreach ( $key in $PSBoundParameters.Keys ) {