Created
March 11, 2020 21:45
-
-
Save viniciusjarina/87e3bf71d1cea1a248f15f1f98720dd4 to your computer and use it in GitHub Desktop.
VS2017.ps1 to export VSDevCmd env vars to PowerShell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pushd "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\Tools" | |
cmd /c "VsDevCmd.bat&set" | | |
foreach { | |
if ($_ -match "=") { | |
$v = $_.split("="); set-item -force -path "ENV:\$($v[0])" -value "$($v[1])" | |
} | |
} | |
popd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment