Home
Manage Your Code
Snippet: Microsoft.PowerShell_profile.ps1 (PowerShell)
Title: Microsoft.PowerShell_profile.ps1 Language: PowerShell
Description: PowerShell profile for SharePoint developers. Includes PowerShell translation of vsvars32.bat. Views: 1146
Author: Tony Bierman Date Added: 5/20/2008
Copy Code  
#
# User-specific settings
#
write-output "`nSetting environment for SharePoint Solutions development.`n"
$WorkspaceRootDir = "C:\usr\src\devteam"
$PowerShellLibDir = "${WorkspaceRootDir}\DeveloperCenter\PowerShell"

# ExCM 
$VBL_ExCM = "Mainline"
$BuildConfig_ExCM = "Debug"
$AppPool_ExCM = "SharePoint - 8081"
$AppRoot_ExCM = "C:\inetpub\wwwroot\wss\VirtualDirectories\8082"
$SiteUrl_ExCM = "http://devapp08:8082"
$WebUrl_ExCM = "http://devapp08:8082/downloadstest"

#
# No need to make changes below this point
#
$env:PATH="${env:ProgramFiles}\WinZip Self-Extractor;$env:PATH;"

#
# SharePoint-specific settings
#
$TwelveHive = "${env:CommonProgramFiles}\microsoft shared\Web Server Extensions\12"
$env:PATH="${TwelveHive}\bin;$env:PATH;"

#
# Devenv for Visual Studio 9.0
#
$env:VSINSTALLDIR="${env:ProgramFiles}\Microsoft Visual Studio 9.0\Common7\IDE"
$env:VCINSTALLDIR="${env:ProgramFiles}\Microsoft Visual Studio 9.0"
$env:FrameworkDir="c:\WINDOWS\Microsoft.NET\Framework"
$env:FrameworkVersion="v3.5"
$env:FrameworkSDKDir="${env:ProgramFiles}\Microsoft Visual Studio 9.0\SDK\v3.5"
$env:FrameworkSDKDir6a="${env:ProgramFiles}\Microsoft SDKs\Windows\v6.0A"

# Root of Visual Studio common files.
if("$env:VSINSTALLDIR" -eq ""){   
	echo "VSINSTALLDIR variable is not set."   
	exit
}

if("$env:VCINSTALLDIR" -eq ""){
	$env:VCINSTALLDIR=$env:VSINSTALLDIR
}
	
# Root of Visual Studio ide installed files.
$env:DevEnvDir=$env:VSINSTALLDIR

# Root of Visual C++ installed files.
$env:MSVCDir="$env:VCINSTALLDIR\VC"
echo "Setting environment for using Microsoft Visual Studio 9.0 tools."
echo "(If you have another version of Visual Studio or Visual C++ installed and wish"
echo "to use its tools from the command line, run vcvars32.bat for that version.)"

#@REM VCINSTALLDIR\Common7\Tools dir is added only for real setup.
$env:PATH="$env:DevEnvDir;$env:MSVCDir\BIN;$env:VCINSTALLDIR\Common7\Tools;$env:VCINSTALLDIR\Common7\Tools\bin\prerelease;$env:VCINSTALLDIR\Common7\Tools\bin;$env:FrameworkSDKDir6a\bin;$env:FrameworkSDKDir\bin;$env:FrameworkDir\$env:FrameworkVersion;$env:PATH;"
$env:INCLUDE="$env:MSVCDir\ATLMFC\INCLUDE;$env:MSVCDir\INCLUDE;$env:MSVCDir\PlatformSDK\include\prerelease;$env:MSVCDir\PlatformSDK\include;$env:FrameworkSDKDir\include;$env:INCLUDE"
$env:xLIB="$env:MSVCDir\ATLMFC\LIB;$env:MSVCDir\LIB;$env:MSVCDir\PlatformSDK\lib\prerelease;$env:MSVCDir\PlatformSDK\lib;$env:FrameworkSDKDir\lib;$env:LIB"