title: How to append to PATH when starting integrated terminal in VisualStudio Code?
body: <p>I need to append an additional folder to my PATH environment variable when I run PowerShell from VisualStudio Code. This change should only exist when running PowerShell from within VisualStudio, since I don't want those extra utilities to be available otherwise (i.e. Updating the PATH variable in Windows settings is not an option.)</p>
  
  <p>I made a few attempts at modifying my user settings but none seem to work.</p>
  
  <p><strong>Attempt 1</strong></p>
  
  <pre><code>    "terminal.integrated.shell.windows" : "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
      "terminal.integrated.shellArgs.windows" : [
          "-NoExit",
          "-Command \"&amp; {$Env:Path += ';C:\\tools'}\""
      ]
  </code></pre>
  
  <p>Result: PowerShell starts with the following error.</p>
  
  <pre><code>-Command : The term '-Command' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that
  the path is correct and try again.
  At line:1 char:1
  + -Command "&amp; {$Env:Path += 'C:\tools'}"
  + ~~~~~~~~
      + CategoryInfo          : ObjectNotFound: (-Command:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
  </code></pre>
  
  <p><strong>Attempt 2</strong></p>
  
  <pre><code>    "terminal.integrated.shell.windows" : "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
      "terminal.integrated.shellArgs.windows" : [
          "-NoExit",
          "-Command", 
          "\"&amp; {$Env:Path += 'C:\\tools'}\""
      ]
  </code></pre>
  
  <p>Result: PowerShell starts with the following output, but the "C:\tools" dir is not appended to the PATH env variable.</p>
  
  <pre><code>&amp; {C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;... += 'C:\tools'}
  </code></pre>
  
  <p>Does anyone know how to invoke PowerShell with an expanded PATH variable from VisualStudio Code?</p>