Modifying the PATH in Powershell

From MyWiki
Revision as of 10:38, 1 March 2016 by George2 (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
If, some time during a PowerShell session, you need to modify the PATH environment variable temporarily,
 you can do it this way
 
$env:Path = $env:Path + ";C:\Program Files\GnuWin32\bin"
 
Or even shorter as per Kevin’s comment
 
$env:Path += ";C:\Program Files\GnuWin32\bin"
 
$env:Path =  "C:\cygwin64\bin;" +  $env:Path  ### didn't work for me