How to Remove 'Open PowerShell' from Windows 10 Context Menu

You may not want or need easy access to PowerShell. So why not clean up your context menu a bit?

Karim Buzdar

January 2, 2018

2 Min Read
Lighted Keyboard

In an earlier post, we walked through the steps to add the ‘Open command window here’ option to the right-click context menu in Windows 10 and why this option is hidden by default. This post illustrates the method of removing ‘Open PowerShell window here’ option from right-click context menu in Windows 10, and the method for removing the 'Open PowerShell window here' option from the context menu in the desktop folder menu.

Step One: Press windows key + R from the keyboard to open the run command. Type regedit and hit enter from the keyboard to open the registry.

Step Two: Go to the following location in the registry.

HKEY_CLASSES_ROOTDirectoryshellPowershell

Step Three: In the registry, right-click Powershell and then click Permissions.

Step Four: In ‘Permissions for Powershell window’, click Advanced.

Step Five: Click the ‘Change’ link located at the top of the window.

Step Six: Type your account name and click ‘Check Names’ to verify it. Click OK when you are done.

Step Seven: Check ‘Replace owner on subcontainers and objects’. Click Apply and then OK.

Step Eight: In ‘Permissions for Powershell window’, select administrator group. Check Allow for ‘Full Control’ option. Click Apply and then OK.

Step Nine: In Powershell subkey, create a new string value called ProgrammaticAccessOnly. (To do thisL Right-click the right window, New -> String Value. Type the name and hit Enter from the keyboard).

That’s it. You won’t see ‘Open PowerShell window here’ option in the context menu when you press shift and then right-click any folder.

Step One: Press windows key + R from the keyboard to open Run command. Type regedit and hit Enter from the keyboard to open the registry.

Step Two: Go to the following location in the registry.

HKEY_CLASSES_ROOTDirectoryBackgroundshellPowershell



Step Three: Right-click the PowerShell subkey, then click Permissions.

Step Four: In the ‘Permissions for Powershell’ window, click Advanced.

Step Five: Click the ‘Change’ link located on top of the window.

Step Six: Type your user account name and then click ‘Check Names’ to verify it. When you are done, click OK.

Step Seven: Check ‘Replace owner on subcontainers and objects.’ Click Apply and then OK.

Step Eight: In ‘Permissions for Powershell’ window, select Administrators group. Check ‘Allow’ for ‘Full Control’ option. Click Apply and then OK.

Step Nine: In Powershell subkey, create a new string value. (To do thisL Right-click the right window, New -> String Value).

Step Ten: Type ‘ProgrammaticAccessOnly’ and then hit Enter from the keyboard.

That was the final step. When you press shift and then right-click the desktop or folder background, you won’t see any option ‘Open PowerShell window here’ in the context menu.

About the Author

Karim Buzdar

https://www.linkedin.com/in/karimbuzdar/

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like