title: PowerShell: Setting an environment variable for a single command only
body: <p>On Linux, I can do:</p>
  
  <pre><code>$ FOO=BAR ./myscript
  </code></pre>
  
  <p>to call "myscript" with the environment variable FOO being set.</p>
  
  <p>Is something similar possible in PowerShell, i.e. without having to first set the variable, call the command, and then unset the variable again?</p>
  
  <p>To be more clear about my use case - I don't want to use this as part of a script. Rather, I have a third-party script whose behavior I can control using environment variables, but, in this case, not command line arguments. So being able to alternate between typing</p>
  
  <pre><code>$ OPTION=1 ./myscript
  </code></pre>
  
  <p>and</p>
  
  <pre><code>$ ./myscript
  </code></pre>
  
  <p>would just be very handy.</p>