On Windows 11 and 10, PowerShell is a handy tool that enables you to run scripts and commands to change system settings, manage features, troubleshoot problems, automate tasks, etc.
Although it is a valuable command-line shell, you might want to disable it to ensure malicious commands or scripts could not be executed. You may also want to restrict access to PowerShell to comply with the company’s policies.
Whatever the reason it might be, Windows 11 and 10 offer multiple ways to disable access to PowerShell.
In this gearupwindows article, we will guide you on disabling the PowerShell application using the Security Policy and Local Group Policy Editor.
How to Turn Off PowerShell on Windows 11 or 10 using Security Policy?
To disable PowerShell on Windows 11 or 10 through Security Policy, use these steps:-
Step 1. Open Local Security Policy.
To do that, click on the
Step 2. Then, double-click on the
If no category is available under the “Software Restriction Policies,” right-click the
When you’re done, two categories will appear under the
Step 3. Now, right-click on the
Step 4. In the “New Hash Rule” window, click on the
Step 5. Once done, File Explorer will open. Navigate to the “%SystemRoot%\system32\WindowsPowerShell\v1.0” path and select the
Step 6. Click the
Step 7. Click the
Step 8. Click the
Step 9. Again, right-click on the
Step 10. In the “New Hash Rule” window, click on the
Step 11. Once done, File Explorer will open. Navigate to the “%SystemRoot%\SysWOW64\WindowsPowerShell\v1.0” path and select the
Step 12. Click the
Step 13. Click the
Step 14. Click the
Step 15. If you have installed PowerShell version 7 also and want to disable it, create another hash rule with this path “%SystemRoot%\Program Files\PowerShell\7\pwsh.exe.”
Step 16. Then, choose the
Step 17. Click the
Step 18. Click the
Step 18. Click the
Step 19. Reboot your PC.
The above steps will altogether disable 32-bit and 64-bit PowerShell on your computer.
How to Disable Access to PowerShell ISE with Local Security Policy?
Although using the above method, you have restricted access to the command-line PowerShell tool; users can still get around this limitation using the PowerShell ISE interface. So, to disable access to this tool with the Local Security Policy, use these steps:-
Step 1. Open Local Security Policy.
To do that, click on the
Step 2. Then, double-click on the
Step 3. Now, right-click on the
Step 4. In the “New Hash Rule” window, click on the
Step 5. Once done, File Explorer will open. Navigate to the “%SystemRoot%\system32\WindowsPowerShell\v1.0” path and select the
Step 6. Click the
Step 7. Click the
Step 8. Click the
Step 9. Again, right-click on the
Step 10. In the “New Hash Rule” window, click on the
Step 11. Once done, File Explorer will open. Navigate to the “%SystemRoot%\SysWOW64\WindowsPowerShell\v1.0” path and select the
Step 12. Click the
Step 13. Click the
Step 14. Click the
Step 15. Restart your computer.
The above steps will disable 32-bit and 64-bit PowerShell ISE on your computer.
How to Turn Off PowerShell on Windows 11 or 10 using Local Group Policy Editor?
To disable PowerShell on Windows 11 or 10 through Local Group Policy Editor, do these steps:-
Step 1. Open Local Group Policy Editor.
Step 2. Then, browse to the following path in the left sidebar of Local Group Policy Editor:-
User Configuration > Administrative Templates > System
Step 3. On the right pane, double click on the
Step 4. Select the
Step 5. Click on the
Step 6. Then, type the following in separate lines and click
- powershell.exe
- powershell_ise.exe
- pwsh.exe
Step 7. Click the
Step 8. Click the
Step 9. Restart your computer.
The next time you try to run the disabled contents, i.e., PowerShell or PowerShellISE, you will see, “This app has been blocked by your system administrator.”