Skip to content

Instantly share code, notes, and snippets.

@tkarpinski
Created July 25, 2011 19:49
Show Gist options
  • Save tkarpinski/1105014 to your computer and use it in GitHub Desktop.
Save tkarpinski/1105014 to your computer and use it in GitHub Desktop.
powershell profile script
#copy this file to C:\users\<username>\Documents\WindowsPowerShell
#clone posh-git to C:\users\<username>\projects https://github.com/dahlbyk/posh-git.git
# Load posh-git example profile
. C:\users\<username>\projects\posh-git\profile.example.ps1
#Set environment variables for Visual Studio Command Prompt
pushd 'c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC'
cmd /c "vcvarsall.bat&set" |
foreach {
if ($_ -match "=") {
$v = $_.split("="); set-item -force -path "ENV:\$($v[0])" -value "$($v[1])"
}
}
popd
write-host "`nVisual Studio 2010 Command Prompt variables set." -ForegroundColor Yellow
#set home dir
cd C:\users\<username>\projects
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment