title: Run Powershell script from URL without temporary file
body: <p>I want to write a PowerShell script that runs a PowerShell script stored at a URL, passing both custom arguments and forwarding any arguments that are given to this PowerShell. Concretely, I can do:</p>
  
  <pre><code>$VAR=Invoke-WebRequest http://example.com/powershell.ps1
  $TEMP=New-TemporaryFile
  $FILE=$TEMP.FullName + ".ps1"
  $VAR.Content | Out-File $FILE
  &amp; $FILE somearguments $args
  </code></pre>
  
  <p>I'd ideally like to do that without using a temporary file, however <code>powershell -content -</code> doesn't seem to allow also passing arguments. Is there any way to avoid the temporary file?</p>