title: PowerShell - Invoke-WebRequest - Relative URI not supported when using -Proxy
body: <p>i try to access websites through a proxy.</p>
  
  <p>I tried the following:</p>
  
  <pre><code>$mycredentials = Get-Credential
  Invoke-WebRequest -Uri heise.de -Proxy proxySrv -ProxyCredential $mycredentials
  </code></pre>
  
  <blockquote>
    <p>Invoke-WebRequest : Dieser Vorgang wird für einen relativen URI nicht
    unterstützt. In Zeile:1 Zeichen:1
    + Invoke-WebRequest -Uri heise.de -Proxy proxySrv -Prox ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Invoke-WebRequest], InvalidOperationException
        + FullyQualifiedErrorId : System.InvalidOperationException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand</p>
  </blockquote>
  
  <p>Translation of error to English:</p>
  
  <blockquote>
    <p>Invoke-WebRequest : This operation is not supported for a relative URI. In line: 1 character: 1
    + Invoke-WebRequest -Uri heise.de -Proxy proxySrv -Prox ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Invoke-WebRequest], InvalidOperationException
        + FullyQualifiedErrorId : System.InvalidOperationException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand</p>
  </blockquote>
  
  <p>If I attempt the command without the Proxy setting I get an error from our proxy.</p>
  
  <p>Can you help figure out why?</p>