Created
July 25, 2011 19:49
-
-
Save tkarpinski/1105014 to your computer and use it in GitHub Desktop.
powershell profile script
This file contains 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
#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