Microsoft introduced Powershell back in Windows XP and has been well-received by the community. For those of you who don’t know, Windows Powershell is the most powerful Windows automation tool that Microsoft has to offer, and it is not as boring as the regular old Windows command prompt.
That said, only Microsoft knows why Windows has a lot of useful, yet hidden features. In this case, you can easily add a “open Powershell here” option to your right-click context menu and ditch the regular old command prompt so that you can enjoy a powerful tool when you need it. Windows doesn’t offer any point and click way to add Powershell to the right-click context menu; you can only do it by adding a couple of registry entries. So let’s dig in and see how to add an “open Powershell here” option to the right click menu.
Add Open Powershell Here Option to Right Click
1. To add “open Powershell here” option to the right-click context menu, we have to add a couple of registry entries to our Windows registry editor. To do that, press “Win + R” to open a run dialog box, type “
regedit” and press the enter button to open Windows registry editor.
2. The above action will open Windows registry editor. Navigate to the below location in the registry editor’s left pane.
3. Once you are at the specified location, right click on the sub key “shell” and create a new key named “powershell” by selecting “New” and then “key” from the options.
4. Once you have done that, right click on the default value and select the “modify” option from the list.
5. The above action will open the “edit string” window. Here enter the value data as “Open PowerShell Here” and click on the OK button to close the window. Actually, you can enter whatever text you want here because this is the value that appears when you right click to open a Powershell window.
6. Now right click on the “powershell” sub key and create a new sub key named “command” by selecting “New” and then “key”.
7. Now right click on the default value under the command sub-key and select the “modify” option from the list.
8. This will again open the “edit string” window. Here enter the following path into the value data field and click on the OK button to close the window.
C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe -NoExit -Command Set-Location -LiteralPath '%L'
Note: If your Windows is not installed on the C drive, change the path accordingly. If you are using Powershell other than version 1.0, then you also need to change that version number (v1.0). That said, you can confirm your version of Powershell by navigating to C:\Windows\System32\WindowsPowerShell. Even the double backslashes (\\) are important; don’t think of them as a typo.
Once you have done that, just close your Windows registry editor and you are all done.
From now on, whenever you want to open a Powershell window in your favorite folder or on the desktop, just right click and select “open powershell here” option from the context menu.
The above action will open the Powershell window at the requested location, and from there you can do whatever you want with the Powershell. It will look something like this.
Hopefully, that helps and do comment below if you face any problems while adding an “open Powershell” option to your right click context menu.
Our latest tutorials delivered straight to your inbox