Table of Contents
This practical guide walks through how to add 'edit or run with' to the right-click menu of PS1, explains the main requirements, and highlights common issues that may appear along the way.
- Run with PowerShell
- Run with PowerShell as administrator
- Run with PowerShell 7
- Run with PowerShell 7 as administrator
- Edit with PowerShell ISE
- Edit with PowerShell ISE as administrator
- Edit with PowerShell ISE (x86)
- Edit with PowerShell ISE (x86) as administrator
- Edit with Notepad
- Edit with Notepad as administrator

How to add "Edit or Run with" to the right-click menu of PS1 files in Windows 10
Here's how to do it:
Step 1. Do step 2 (add - right click), step 3 (add - Shift + right click) or step 4 (delete) below depending on what you want to do.
Step 2. To add the "Edit or Run with" PS1 file context menu (just right-click to show it), download the Add_Edit_or_Run_with_to_PS1_context_menu.reg file.
Contents of REG file) - Code:
Windows Registry Editor Version 5.00 [-HKEY_CLASSES_ROOT.ps1] [HKEY_CLASSES_ROOT.ps1] @="Microsoft.PowerShellScript.1" [-HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1] [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1] "EditFlags"=dword:00020000 " =hex(2):40.00,22,00,25,00,73,00,79,00,73,00,74,00,65,00,6d, 00,72,00,6f,00, 6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00.6d,00,33,00,32,00.5c, 00,77,00,69,00,6e,00,64,00,6f,00,77,00,73,00,70.00,6f,00,77,00,65,00,72,00, 73,00,68,00,65,00,6c,00,6c,00.5c,00,76,00,31,00,2e,00,30.00, 5c,00,70,00.6f, 00,77,00,65,00,72,00,73,00,68,00,65,00,6c,00,6c,00,2e,00,65,00,78,00,65,00, 22.00.2c,00,2d,00,31,00,30.00,33,00.00,00 [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1DefaultIcon] @=""C:WindowsSystem32WindowsPowerShellv1.0 powershell_ise.exe",1"[HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1Shell] @="Open" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellOpenCommand] @=""C:WindowsSystem32notepad.exe" "%1"" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-with] "MUIVerb"="Edit or Run with" "Extended"=- "SubCommands"="" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-withshell01flyout] "MUIVerb"="Run with PowerShell" "Icon"="powershell.exe" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-withshell01flyoutCommand] @=""C:WindowsSystem32WindowsPowerShellv1.0powershell.exe" "-Command" "if((Get-ExecutionPolicy ) -ne 'AllSigned') { Set-ExecutionPolicy -Scope Process Bypass }; & '%1'"" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-withshell02flyout] "MUIVerb"="Run with PowerShell as administrator" "HasLUashield"="" "Icon"="powershell.exe" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run -withshell02flyoutCommand] @=""C:WindowsSystem32WindowsPowerShellv1.0powershell.exe" "-Command" ""& {Start-Process PowerShell.exe -ArgumentList '-ExecutionPolicy RemoteSigned -File "%1 "' -Verb RunAs}"" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-withshell03flyout] "MUIVerb"="Run with PowerShell 7" "Icon"="pwsh.exe" "CommandFlags"=dword:00000020 [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript .1ShellEdit-Run-withshell03flyoutCommand] @=""C:Program FilesPowerShell7pwsh.exe" "-Command" "if((Get-ExecutionPolicy ) -ne 'AllSigned') { Set-ExecutionPolicy -Scope Process Bypass }; & '%1'"" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-withshell04flyout] "MUIVerb"="Run with PowerShell 7 as administrator" "HasLUAShield"="" "Icon"="pwsh.exe" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript. 1ShellEdit-Run-withshell04flyoutCommand] @=""C:Program FilesPowerShell7pwsh.exe" "-Command" ""& {Start-Process pwsh.exe -ArgumentList '-ExecutionPolicy RemoteSigned -File "%1 "' -Verb RunAs}"" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-withshell05flyout] "MUIVerb"="Edit with PowerShell ISE" "Icon"="powershell_ise.exe" "CommandFlags"=dword:00000020 [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-withshell05flyoutCommand] @=""C: WindowsSystem32WindowsPowerShellv1.0powershell_ise.exe" "%1"" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-withshell06flyout] "MUIVerb"="Edit with PowerShell ISE as administrator" "HasLUAShield"="" "Icon "="powershell_ise.exe" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-withshell06flyoutCommand] @="PowerShell -windowstyle hidden -Command "Start-Process cmd -ArgumentList '/s,/c,start PowerShell_ISE.exe ""%1" "'-Verb RunAs"" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-withshell07flyout] "MUIVerb"="Edit with PowerShell ISE (x86)" "Icon"="powershell_ise.exe" "CommandFlags"=dword:00000020 [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript 1ShellEdit-Run-withshell07flyoutCommand] @=""C:WINDOWSsyswow64WindowsPowerShellv1.0powershell_ise.exe" "%1"" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-withshell08flyout] "MUIVerb"="Edit with PowerShell ISE (x86) as administrator" "HasLUAShield"="" "Icon"="powershell_ise.exe" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-withshell08flyoutCommand] @="PowerShell -windowstyle hidden -Command "Start-Process cmd -ArgumentList '/s,/c,start C:WINDOWSsyswow64WindowsPowerShellv1.0powershell_ise.exe ""%1""' -Verb RunAs"" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run -withshell09flyout] "MUIVerb"="Edit with Notepad" "Icon"="notepad.exe" "CommandFlags"=dword:00000020 [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-withshell09flyoutCommand] @=""C:WindowsSystem32 notepad.exe" "%1"" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-withshell10flyout] "MUIVerb"="Edit with Notepad as administrator" "HasLUAShield"="" "Icon"="notepad.exe" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript .1ShellEdit-Run-withshell10flyoutCommand] @="PowerShell -windowstyle hidden -Command "Start-Process cmd -ArgumentList '/s,/c,start C:WindowsSystem32notepad.exe ""%1""' -Verb RunAs""
Step 3. To add the "Edit or Run with" PS1 file context menu (Shift + right-click to display), download the Add_Shift + Edit_or_Run_with_to_PS1_context_menu.reg file.
Contents of file REG - Code:
Windows Registry Editor Version 5.00 [-HKEY_CLASSES_ROOT.ps1] [HKEY_CLASSES_ROOT.ps1] @="Microsoft.PowerShellScript.1" [-HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1] [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1] "EditFlags"=dword:00020000 " =hex(2):40.00,22,00,25,00,73,00,79,00,73,00,74,00,65,00,6d, 00,72,00,6f,00, 6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00.6d,00,33,00,32,00.5c, 00,77,00,69,00,6e,00,64,00,6f,00,77,00,73,00,70.00,6f,00,77,00,65,00,72,00, 73,00,68,00,65,00,6c,00,6c,00.5c,00,76,00,31,00,2e,00,30.00,5c,00,70,00.6f, 00,77,00,65,00,72,00,73,00,68,00,65,00,6c,00,6c,00,2e,00,65,00,78,00,65,00, 22.00.2c,00,2d,00,31,00,30.00,33,00.00,00 [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1DefaultIcon] @=""C:WindowsSystem32WindowsPowerShellv1.0 powershell_ise.exe",1"[HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1Shell] @="Open" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellOpenCommand] @=""C:WindowsSystem32notepad.exe" "%1"" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-with] "MUIVerb"="Edit or Run with" "Extended"="" "SubCommands"="" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-withshell01flyout] "MUIVerb"="Run with PowerShell" "Icon"="powershell.exe " [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-withshell01flyoutCommand] @=""C:WindowsSystem32WindowsPowerShellv1.0powershell.exe" "-Command" "if((Get-ExecutionPolicy ) -ne 'AllSigned'" ) { Set-ExecutionPolicy -Scope Process Bypass };& '%1'"" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-withshell02flyout] "MUIVerb"="Run with PowerShell as administrator" "HasLUAShield"="" "Icon"="powershell.exe" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit -Run-withshell02flyoutCommand] @=""C:WindowsSystem32WindowsPowerShellv1.0powershell.exe" "-Command" ""& {Start-Process PowerShell.exe -ArgumentList '-ExecutionPolicy RemoteSigned -File " %1"' -Verb RunAs}"" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-withshell03flyout] "MUIVerb"="Run with PowerShell 7" "Icon"="pwsh.exe" "CommandFlags"=dword:00000020 [HKEY_CLASSES_ROOTMicrosoft .PowerShellScript.1ShellEdit-Run-withshell03flyoutCommand] @=""C:Program FilesPowerShell7pwsh.exe" "-Command" "if((Get-ExecutionPolicy ) -ne 'AllSigned') { Set-ExecutionPolicy -Scope Process Bypass }; & '%1'"" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-withshell04flyout] "MUIVerb"="Run with PowerShell 7 as administrator" "HasLUAShield"="" "Icon"="pwsh.exe" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript. 1ShellEdit-Run-withshell04flyoutCommand] @=""C:Program FilesPowerShell7pwsh.exe" "-Command" ""& {Start-Process pwsh.exe -ArgumentList '-ExecutionPolicy RemoteSigned -File "%1 "' -Verb RunAs}"" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-withshell05flyout] "MUIVerb"="Edit with PowerShell ISE" "Icon"="powershell_ise.exe" "CommandFlags"=dword:00000020 [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-withshell05flyoutCommand] @=""C: WindowsSystem32WindowsPowerShellv1.0powershell_ise.exe" "%1"" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-withshell06flyout] "MUIVerb"="Edit with PowerShell ISE as administrator" "HasLUAShield"="" "Icon "="powershell_ise.exe" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-withshell06flyoutCommand] @="PowerShell -windowstyle hidden -Command "Start-Process cmd -ArgumentList '/s,/c,start PowerShell_ISE.exe ""%1" "'-Verb RunAs"" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-withshell07flyout] "MUIVerb"="Edit with PowerShell ISE (x86)" "Icon"="powershell_ise.exe" "CommandFlags"=dword:00000020 [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript 1ShellEdit-Run-withshell07flyoutCommand] @=""C:WINDOWSsyswow64WindowsPowerShellv1.0powershell_ise.exe" "%1"" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-withshell08flyout] "MUIVerb"="Edit with PowerShell ISE (x86) as administrator" "HasLUAShield"="" "Icon"="powershell_ise.exe" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-withshell08flyoutCommand] @="PowerShell -windowstyle hidden -Command "Start-Process cmd -ArgumentList '/s,/c,start C:WINDOWSsyswow64WindowsPowerShellv1.0powershell_ise.exe ""%1""' -Verb RunAs"" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run -withshell09flyout] "MUIVerb"="Edit with Notepad" "Icon"="notepad.exe" "CommandFlags"=dword:00000020 [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-withshell09flyoutCommand] @=""C:WindowsSystem32 notepad.exe" "%1"" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-withshell10flyout] "MUIVerb"="Edit with Notepad as administrator" "HasLUAShield"="" "Icon"="notepad.exe" [HKEY_CLASSES_ROOTMicrosoft.PowerShellScript .1ShellEdit-Run-withshell10flyoutCommand] @="PowerShell -windowstyle hidden -Command "Start-Process cmd -ArgumentList '/s,/c,start C:WindowsSystem32notepad.exe ""%1""' -Verb RunAs""
Step 4. To remove the "Edit or Run with" PS1 file context menu, download the Remove_Edit_or_Run_with_from_PS1_context_menu.reg file.
Contents of file REG - Code:
Windows Registry Editor Version 5.00 [-HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1ShellEdit-Run-with]
Step 5. Save the .reg file to the desktop.
Step 6. Double-click the downloaded .reg file to merge.
Step 7. When prompted, click Run > Yes (UAC) > Yes > OK to approve the merge.
Step 8. Now you can delete the downloaded .reg file if you want.
Hope you are succesful.
Key Takeaways
Use the information above as a practical reference for how to add 'edit or run with' to the right-click menu of PS1. Review each step carefully, confirm any requirements, and choose the option that best fits your situation.
FAQ
What does this guide explain about Add 'Edit or Run with' to the Right-click Menu of PS1?
It explains the main concepts, practical considerations, and useful steps related to add 'edit or run with' to the right-click menu of PS1 without requiring advanced knowledge.
Who can benefit from learning about Add 'Edit or Run with' to the Right-click Menu of PS1?
This information is useful for readers who want a clear overview, practical guidance, and reliable steps related to add 'edit or run with' to the right-click menu of PS1.
What should I check before applying this information?
Review the requirements, confirm that your device, software, or situation matches the instructions, and back up important data before making major changes.
Reader Comments 0
Sign in with email or Google to join the discussion.