Restore the Old Right-Click Menu in Windows 11 Using PowerShell Script
We previously created a tutorial on how to restore the old right-click menu in Windows 11.
It’s a simple method that restores the old right-click menu by adding a registry key change.
But for those who don't want to manually edit the registry, I’ve created a PowerShell script that automates the process.
Here’s the PowerShell Script
# Run as administrator
$registryPath = "HKCU:\Software\Classes\CLSID\{86CA1AA0-34AA-4E8B-A509-50C905BAE2A2}"
$subKeyPath = "$registryPath\InprocServer32"
# Create the registry key
New-Item -Path $registryPath -Force | Out-Null
New-Item -Path $subKeyPath -Force | Out-Null
# Set the default value to empty
Set-ItemProperty -Path $subKeyPath -Name "(Default)" -Value ""
Write-Host "Old right-click menu restored. Please restart your computer for changes to take effect."
Steps to Run the Script
What you need to do is create a file with a .ps1
extension and run it as an administrator.
The name of the file doesn’t matter, but it’s important that the file ends with a .ps1
extension, not .txt
. The safest way to do this is by creating the file using the terminal.
In this example, we will create a script called OldRightClickMenu.ps1
in the Documents folder.
Step 01 - Open a PowerShell console as Administrator and navigate to the Documents folder:
cd $env:USERPROFILE\Documents
Step 02 - Create a file called OldRightClickMenu.ps1
:
notepad OldRightClickMenu.ps1
Step 03 - Copy and paste the following script into the file:
# Run as administrator
$registryPath = "HKCU:\Software\Classes\CLSID\{86CA1AA0-34AA-4E8B-A509-50C905BAE2A2}"
$subKeyPath = "$registryPath\InprocServer32"
# Create the registry key
New-Item -Path $registryPath -Force | Out-Null
New-Item -Path $subKeyPath -Force | Out-Null
# Set the default value to empty
Set-ItemProperty -Path $subKeyPath -Name "(Default)" -Value ""
Write-Host "Old right-click menu restored. Please restart your computer for changes to take effect."
Step 04 - Change the execution policy to allow scripts to run:
Set-ExecutionPolicy Bypass Process
Step 05 - Run the script:
.\OldRightClickMenu.ps1
Step 06 - Restart the computer:
After restarting, you will have the old-style right-click menu.

Behind the scenes, the script modifies the Windows registry to restore the old right-click menu. You can click this link to learn more about the process in detail and how to switch back to the new right-click menu.