Functions/Web/Format-QueryParamString.ps1
Function Format-QueryParamString { [CmdletBinding()] Param ( # [Parameter(Mandatory=$true)] [psobject] $Params ) Process { # break down params list into key-value pairs $qString = "?" + "$(($Params.keys | foreach {"$($_)=$(([System.Web.HttpUtility]::UrlEncode($params.$_)) -replace '\+','%20')"}) -join '&')" $qString } } |