Created
June 3, 2019 09:57
-
-
Save IamAdiSri/951a04f28b3cf1c5b8ea691abd5f7188 to your computer and use it in GitHub Desktop.
Windows PowerShell Profile Snippets
This file contains hidden or 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
# Loads the Visual Studio Developer Command Prompt environment into Powershell | |
$installationPath = "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools" | |
if ($installationPath -and (test-path "$installationPath\Common7\Tools\vsdevcmd.bat")) { | |
& "${env:COMSPEC}" /s /c "`"$installationPath\Common7\Tools\vsdevcmd.bat`" -no_logo && set" | foreach-object { | |
$name, $value = $_ -split '=', 2 | |
set-content env:\"$name" $value | |
} | |
} | |
echo "> Visual Studio Developer Command Prompt loaded onto environment." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment