Skip to content

Instantly share code, notes, and snippets.

@clupasq
Created September 16, 2014 15:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save clupasq/d333d61181d5bf020ca5 to your computer and use it in GitHub Desktop.
Save clupasq/d333d61181d5bf020ca5 to your computer and use it in GitHub Desktop.
Set Developer Command Prompt (VS 2013) in PowerShell
Function vs2013CommandPromptVariables()
{
pushd 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools'
cmd /c "VsDevCmd.bat&set" |
foreach {
if ($_ -match "=") {
$v = $_.split("="); set-item -force -path "ENV:\$($v[0])" -value "$($v[1])"
}
}
popd
write-host "`nVisual Studio 2013 Command Prompt variables set." -ForegroundColor Cyan
write-host
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment