How to Add a Command “Open PowerShell Here” to Right-Click Folder’s Menu in Windows
One can easily add a command “Open PowerShell Here” to right-click folder’s menu for the purpose of task automation and configuration management.
Simply, you can open Powershell window here instead of cmd. This command is the best alternative of command prompt which has its own GUI.
When you feel irritation to use a command prompt, you can add a command “Open PowerShell Here” to right-click the folder’s menu in Windows.
An option “Open command window here” is given already to the folder’s right-click menu but if you want to add “Open PowerShell Here” for more power set to do any type automation, you have to go towards Windows Registry for few quick edits.
Try these also:
Adding “Open PowerShell Here” by Manual Editing in Windows Registry:
Be sure that you have a little knowledge about Windows Registry because a couple of wrong edits can harm the ability of the Windows you are using.
Do not try to go out of the instructions given here.so, it is better to have some knowledge about the use of Windows Registry which is a powerful tool.
For manual editing in Windows Registry, you must follow the given instructions:
- Hit on the Start Menu and type “regedit”
- Now, press Enter button which will open Registry Editor
- A permission will be asked to make the changes on your PC
- A window of Registry Editor will be opened in front of you
- Here, you have to use the left side-bar and navigate the given key
- Now, you have to generate a new key in the “shell” key
- For generating a new key, right-click on the “shell” key and select New > key
- Here, name the new generated key “Powershellmenu”(key name depends upon your choice). We are naming another name because “Powershell” key is already presented here in the list of sidebar menu to serve other tasks. You can notice this through the screenshot given below
- After completing instructions, you can change (Default) value inside the new generated “Powershellmenu” key
- When you double-click on the (Default) value, its properties will appear
- Now, you have to set the value “Open PowerShell Here” in the “Data” field
- This given value will appear in the context menu, Click on “OK”
- As an optional step, you can also set the command by holding shift down while right-clicking on any derive. It is a similar way like opening an “Opencommand prompt”
- Command will be hidden unless you Shift+right click a folder
- Right-click on “Powershellmenu” key and select New > String value
- Name this value “Extended”
- Do not try any other changes in it
- The string will cause the command which will be hidden behind the Shift key access
Reset process is the same either you choose the optional step or not.
- Now, generate a new key inside the “Powershellmenu” key
- Right-click on the “Powershellmenu” key and select New > Key
- Name this new key as “Command”
- Change the (Default) value inside the new “Command” key
- Double-click on (Default) value to open its properties
- (Default) the value specifies the basic command that will run at the time of clicking on the folder’s right-click menu
- Write the following text in the “Data” field and then click “OK”
[su_highlight]C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe -NoExit -Command Set-Location -LiteralPath ‘%L'[/su_highlight]
- Right-click on any folder to use the command “Open PowerShell Here”
- In case when you used the optional settings you must press Shift+right-click to use “Open PowerShell Here” option
- All the changes mentioned above must be taken within the short time so that you can get out of the Registry Editor
- In case, when you want to reset all the changes you made in Windows Registry, just go back to the Registry Editor and delete all the values you put in “Data” fields. It will reverse all the settings as it was before.
Here, in this article, we tried to cover-up from every aspect of this topic. If you feel something missing here you must mention it in our comments section or you can send an e-mail at email@example.com