Alex Rivera | Logout

Use PowerShell for Visual Studio Command Prompt

Asked 2010-12-09T12:22:43.677
21

In a serious intiative to migrate all my command line operations to PowerShell, I would like to avoid using the old fashioned command console for anything. However, the Visual Studio Command prompt has various environment variables and path settings not found in the default command prompt. How could I create a 'Visual Studio PowerShell' with those same settings?

Edit
Report

1 Answer

1

What I do is create a simple cmd batch command script that looks like this:

call "%VS80COMNTOOLS%vsvars32.bat"
powershell

Then I create a shortcut that invokes this through cmd. The shortcut target looks like:

%windir%\System32\cmd.exe /k "SetupPSBuildEnvironment.cmd"

If you want the console to look like the powershell console, just modify the Layout to your liking in the shortcut properties.

answered 2010-12-09T19:14:25.747

Your Answer