Monday, February 21, 2011

How to start PowerShell from Windows Explorer?

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.

From stackoverflow
  • 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.

  • 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.

    Gulzar : oops. i think we posted around same time. +1 for duplicate.:)
    Ken Egozi : 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.
  • You can download the inf file from here - Introducing PowerShell Prompt Here

  • 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.

    Chris Sutton : Nice, I had been doing explorer . but ii . is a lot quicker, thanks.
  • 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

0 comments:

Post a Comment