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

Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>