Taken from here for prosperity.
Put this in %USERDIR%/Documents/WindowsPowerShell/profile.ps1
, run a PowerShell terminal and you should see the messages "Visual Studio 2015..." pop up.
# Set environment variables for Visual Studio Command Prompt | |
pushd 'c:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools' | |
cmd /c "vsvars32.bat&set" | | |
foreach { | |
if ($_ -match "=") { | |
$v = $_.split("="); set-item -force -path "ENV:\$($v[0])" -value "$($v[1])" | |
} | |
} | |
popd | |
write-host "`nVisual Studio 2015 Command Prompt variables set." -ForegroundColor Yellow |