Context Aware Access to Command Prompt or PowerShell in Windows

I have been ramping up on ASP.NET 5 which has had me in PowerShell or the command prompt quite a bit (this is to support upcoming x-plat features).  In many cases, I have needed to run commands in the context of a folder.  Here is an easy way to do this in Windows Explorer…  

From the Windows File menu

Suppose I am in a folder and I want to immediately go to the command prompt or PowerShell and already be in the context of that directory?  I simply go to the File menu option in Windows Explorer ([Alt] F keyboard shortcut) and select either the command prompt or PowerShell as seen below:

File menu in windows explorer
Letters appear when [Alt] key is used

If I choose the command prompt, it will put me in the same directory as the current open window as seen here:

path in windows and command prompt

    Copyright © Microsoft Corporation. All rights reserved.
    The code provided in this post is licensed under the Microsoft Public License (Ms-PL).
blog comments powered by Disqus