title: Powershell invoke-webrequest not working
body: <p>I have a Powershell script that is supposed to run an <code>Invoke-WebRequest</code> against a site. I want to use this script with PRTG Network Monitor to ensure that a web server is up and running properly.</p>
  
  <p>Currently, the script works running from my local machine as well as running with my domain credentials on the probe server. However, it doesn't run when logged in with the local admin credentials which is what PRTG uses.</p>
  
  <p>I've narrowed it down to a single line,</p>
  
  <pre class="lang-html prettyprint-override"><code>Invoke-WebRequest $uri -Method POST -Body $body -TimeoutSec 10
  </code></pre>
  
  
  
  <p>It appears that for whatever reason, when using this account, <code>Invoke-WebRequest</code> will not work. When running that line, it doesn't produce anything, no error, warning, or output. Both <code>$uri</code> and <code>$body</code> variables are already defined as well.</p>
  
  <p>Even if I'm logged into the probe server with the local admin PRTG account and run Powershell as another user (using my own credentials) it still fails to produce anything.</p>
  
  <p>Why would a local admin account not be able to run <code>Invoke-WebRequest</code>? This is happening on a Windows Server 2012R2 with PSVersion 4.0.</p>