SEARCH

How-To Geek

How to Add “Open PowerShell here” to the Context Menu in Windows

image

For as long as we can remember, Windows has had a hidden “Open command window here” option on the context menu, but who uses the command prompt these days?

How to Add “Open PowerShell here” to the Context Menu in Windows

Press the Win + R keyboard combination to open the run dialog, then type regedit and hit enter.

image

Once the registry editor has opened, navigate to:

HKEY_CLASSES_ROOT\Directory

image

Here, you will need to right click on the shell sub-key and create a new key called “powershell”.

image

image

Once you have created the key, you need to modify its default value, which can be done from the right click context menu.

image

In the value data field textbox, type “Open PowerShell Here”, which is the text that we want to add to the Windows context menu.

image

Now right click on the white space on the right hand side, create a new Key and call it command.

image

image

Then right click on the command key’s default value and choose to modify it as well.

image

This time, we have to set it to something special. If your version of Windows is installed into a different directory, or you are using a different version of powershell, you’ll need to adjust these values. The important thing is that you use the double slashes and add the extra stuff at the end.

C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe -NoExit -Command Set-Location -LiteralPath '%L'

image

That’s all there is to it.

image

image

Taylor Gibb is a Microsoft MVP and all round geek, he loves everything from Windows 8 to Windows Server 2012 and even C# and PowerShell. You can also follow him on Google+

  • Published 06/19/13

Enter Your Email Here to Get Access for Free:

Go check your email!