views:

3021

answers:

5

Does anyone know of a way to start PowerShell in a specific folder from Windows Explorer, e.g. to right-click in a folder and have an option like "Open PowerShell in this Folder".

It's really annoying to have to change directories to my project folder the first time I run MSBuild every day.

+2  A: 

Try the PowerShell PowerToy.. it adds a context menu item for Open PowerShell Here.

Or you could create a shortcut that opens PowerShell with the Start In folder being your Projects folder.

Steven Murawski
+7  A: 

http://www.hanselman.com/blog/IntroducingPowerShellPromptHere.aspx

Scott Hanselman has a really simple inf that will do this for you. If you want to tweak the script it is really easy to go and edit the inf for customizations.

Chris Sutton
oops. i think we posted around same time. +1 for duplicate.:)
Gulzar
I like Chris' answer better, as he gives credit where credit due, both by implicitly (with Scott's domain in the full url) and explicitly.
Ken Egozi
+18  A: 

You can download the inf file from here - Introducing PowerShell Prompt Here

Gulzar
+6  A: 

Just to add in the reverse as a trick, at a powershell prompt you can do:

ii .

To open an explorer window in your current directory.

EBGreen
Nice, I had been doing explorer . but ii . is a lot quicker, thanks.
Chris Sutton
A: 

There's a Windows Explorer extension made by the dude who makes tools for SVN that will at least open a command prompt window. Haven't tried it yet so I don't know if it'll do Powershell, but I wanted to share the love with my Stackoverflow bretheren:

http://tools.tortoisesvn.net/StExBar

Josh Kodroff