Files
ZertoApiWrapper/Functions/New-ZertoApiFilter.ps1
T
2019-02-19 15:53:30 -05:00

19 lines
491 B
PowerShell

function New-ZertoApiFilter {
[cmdletbinding()]
param(
[Parameter( Mandatory = $true )]
[hashtable]$filterTable
)
[string]$returnString = "?"
foreach ( $key in $filterTable.Keys ) {
if ($returnString.Length -gt 1) {
$returnString = "{0}&{1}={2}" -f $returnString, $key, $filterTable[$key]
} else {
$returnString = "{0}{1}={2}" -f $returnString, $key, $filterTable[$key]
}
}
return $returnString
}