#Set environment variables for Visual Studio Command Prompt #http://stackoverflow.com/questions/2124753/how-i-can-use-powershell-with-the-visual-studio-command-prompt function batCall([string] $path, [string] $arg) { cmd /c "$(path)&set" | foreach { if ($_ -match "=") { $v = $_.split("="); set-item -force -path "ENV:\$($v[0])" -value "$($v[1])" } } }