May 112010
This confused me for a minute. But once I realized what was going on I felt like a dolt.
$Query = $UriBuilder.Query
if ($Query.Length > 1) {
$Query = $Query.Substring(1) + '&'
}
$UriBuilder.Query = $Query + $KeyValuePair
Access to the path 'C:\Windows\system32\1' is denied.
At C:\Blah\Blah.psm1:366 char:32
+ if ($Query.Length > <<<< 1) {
+ CategoryInfo : OpenError: (:) [], UnauthorizedAccessException
+ FullyQualifiedErrorId : FileOpenFailure