Sometimes, PowerShell can be used for bad purposes as well. It can be utilized to perform automated malicious tasks and effectively infect devices across an entire network. In some environments, it may be advisable to disable PowerShell, particularly if you believe an individual is not using PowerShell for everyday tasks. This article explores two ways through which you can disable Windows PowerShell on your computer so that it does not become abused.
Disable PowerShell in Windows 10 using Group Policy
On Windows 10, you can also manage your PC with tools like Group Policy Editor. Tip: If you are a Windows 10 Home Edition user, follow this guide to install the Group Policy Editor. You can use the Group Policy Editor to disable Windows PowerShell on your PC, here is how: Now try launching PowerShell from the Start Menu but it won’t work, because the PowerShell Core (pwsh.exe) has also been disabled and launching it via the Run menu will prompt you with the following: If at any point you wish to re-enable PowerShell, simply return to the same location within the Group Policy Editor, double-click Don’t run specified Windows application, and select the Disabled or Not Configured radio button.
Disable PowerShell in Windows 10 using Local Security Policy
The Local Security Policy Editor in Windows 10 allows users to manage their security protocols across users as well as the entire computer. Tip: If you are a Windows 10 Home Edition user, follow this guide to install the Security Policy Editor. Here is how you can disable Windows PowerShell using the Security Policy Editor: Trying to run disabled content (PowerShell or PowerShellISE) will result in the following prompt: If you want to re-enable Windows PowerShell or ISE, simply re-open the Local Security Policy Editor and click Additional Rules on the left pane. Now, right-click the Hash Rules you have created in the right pane and click Delete from the context menu. If a confirmation dialog box appears, click Yes. Now all you need to do is reboot your computer to re-enable Windows PowerShell when required.
Disable PowerShell 7 in Windows 10
If you have PowerShell 7 on your Windows 10 device, then the method to remove it from your PC would be a bit different than the ones above. PowerShell 7 can be considered an application. Hence, you can remove it using the Settings app. Here is how to do so: Now, trying to launch PowerShell 7 will result in a prompt stating that it could not find it. However, if you ever need it in the future, click this link to download the latest standalone version of PowerShell.
Closing words
Windows PowerShell is a powerful tool that not everybody should use. It may appear complicated for some, but it is also an avenue for malicious activity for others. It may be good practice for the IT administrators to only enable PowerShell when they are using a device while disabling it for the other standard users. Also see:
2 ways to reset Local Group Policy in Windows 102 Ways to Disable PIN Authentication in Google Chrome Remote Desktop2 Ways to Export and Import Group Policy Settings in Windows3 Ways to Disable Fast User Switching in Windows 104 Ways to Disable Windows 10 Automatic Restart