title: New-WebServiceProxy cmdlet fails with "The operation has timed out" exception
body: <p>I'm deploying an ASP.NET application with PowerShell. It includes the web service, and I need to call one of its methods right after the web application is deployed. Obviously, this request will take time as it should "warm up" the website.</p>
  
  <p>So, I make a plain call to <code>New-WebServiceProxy</code> to get the proxy object and then call a method:</p>
  
  <pre><code>$ps = New-WebServiceProxy -Uri "http://mysite/folder/myservice.asmx"
  </code></pre>
  
  <p>However, this operation takes some time and always fails with the timeout exception. I should say that it's all happening in the remote session. When the application is deployed locally (hence the script runs in a local session) the call succeeds.</p>
  
  <p>I have verified the <code>executionTimeout</code> of the <code>&lt;httpRuntime&gt;</code> in the web.config - it has quite big timeout. But it is my assumption that it is not taken into consideration before the first call is made. So, I assume it is some property/switch of the <code>New-WebServiceProxy</code>, which should influence this behavior, but I failed to find it.</p>
  
  <p>Does anyone have an idea?</p>
  
  <p>P.S. I'm using PowerShell 2.0, but if the solution is there in v3.0, it is acceptable.</p>