In this guide, we will see how you can add PowerShell to the Context Menu on your Windows 11/10 computer. PowerShell is one of the best CLI tools for Windows operating systems and adding it to the Context Menu allows you to access it just by a couple of clicks.
How do I add PowerShell to the context menu?
To add PowerShell to the Context menu on your Windows computer, you need to make changes to the Registry Editor as given below. However, before making any changes, take a backup of all your registries as they will be restored if needed.
Add PowerShell to Context Menu in Windows 11/10
To add PowerShell to the context menu in Windows 11/10, follow our instructions outlined below.
- Press the Windows key + R to invoke the Run dialog box.
- In the Run dialog box, type regedit and hit Enter to open Registry Editor.
- Navigate or jump to the registry hive location below:
HKEY_CLASSES_ROOT\Directory\shell
- On the left pane, right-click on the shell key, choose New > Key, and name it PowerShellDesktop.
- Click on the newly created PowerShellDesktop key.
- On the right pane, double-click the Default string value to edit its properties.
- Type Open PowerShell Here in the Value data field.
- Click OK.
Again, on the left pane, right-click on the PowerShellDesktop key, choose New > Key, and name it Command.
- Click on the newly created Command key.
- On the right pane, double-click the Default string value to edit its properties.
- Copy and paste the string value below into the Value data field.
C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe -NoExit -Command Set-Location -LiteralPath ‘%L’
OR
C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe -NoExit -Command Set-Location -LiteralPath '%V'
Windows PowerShell default path is C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe.
If you installed Windows on any other partition then you need to search the PowerShell path. Also, if you installed any other version of PowerShell, then change the v1.0 to the current version installed on your machine.
- Click OK.
- Restart your computer for the changes to take effect.
For your information, our Ultimate Windows Tweaker lets you add PowerShell to the context menu on Windows 11/10 with just a click!
Read: How to Install Google Chrome using Windows PowerShell
How do I enable PowerShell in Windows 11?
PowerShell is installed by default on Windows 11. You can launch it by searching it out of the Start Menu. To open it in elevated mode, search PowerShell from the Start Menu, right-click on it, and click on Run as administrator. Finally, click on Yes when the UAC prompt appears.
Also Read: Format External Hard Drive or USB drive using PowerShell.