Windows PowerShell is an essential and convenient application included in the Windows operating system. But sometimes, you may need to disable it to avoid making unwanted changes by running malicious commands. This tool is used by a threat actor to create malicious software that runs malicious scripts and accesses the file system and registry. In other words, you can say that this tool is also used by some hackers to run malicious commands. In such a case, if you need to disable the PowerShell application then this article will help you to do so. This article explains how to disable the PowerShell application using Security policy and Local Group Policy Editor. Let us see them in detail.
Disable PowerShell on Windows 11/10
Before you proceed, it is recommended to create a System Restore point. Now follow the below suggestions to disable Windows PowerShell on Windows 10:
1] Disable PowerShell on Windows using Security Policy
Local Security Policy offers users a way to block PowerShell access on Windows 10. Follow the instructions given below to do so:
In the New Has Rule window, tap on the Browse option. Now open the file explorer using Windows+E keys and type the following path location in the address bar and press Enter: This will locate the 32-bit version of PowerShell. Select the powershell.exe from the list and then click Open > Apply > OK.
Disable PowerShellISE
If you want to disable PowerShellISE on your Windows 10 computer, then select powershell_ise.exe (instead of powershell.exe) from the list. In the Local Security Policy window, right-click on the Additional Rules under the Software Restriction Policies section and click on the New Hash Rule button and then select the Browse button. Again open the File Explorer and copy-paste the path given below in the address bar. Then press the Enter key to select the 64-bit version of PowerShell. On the following page, scroll down and select the powershell.exe option and then click on the Open button. Note: You need to select the powershell_ise.exe option if you want to disable PowerShellISE. Then click Apply and then select the OK button. After completing the above steps, restart your computer to save the changes. This will disable Powershell access on your PC.
2] Disable PowerShell on Windows using Group Policy
Local Group Policy Editor is a powerful tool available in Windows 10 Pro or Enterprise that eases several tasks on PC. Those users with the Pro or Enterprise version of Windows 11/10 can use the Group policy tool to block PowerShell. Follow the below steps to disable PowerShell using Group Policy: First of all, press the Windows+R keyboard shortcut to open the Run dialog box. Type gpedit.msc and hit Enter. In the Local Group Policy Editor window, navigate to the path below: User Configuration > Administrative Templates > System
Go to the right pane and double click on the Don’t run specified Windows applications policy.
On the next page, click on the Enabled button as shown in the above image. Then go to the Options sections and click on the Show button. Now you need to open a new cell in the Value column, type powershell.exe, and click the OK button. This will disable the PowerShell access. You can also disable the PowerShell ISE interface. To do so, open a new cell, type powershell_ise.exe, and click the OK button. However, if you need to disable the PowerShell 7, type pwsh.exe in the new cell and then click the OK button. In last, click Apply > OK to save the changes. Once you complete the above process, you will not be able to access Powershell anymore. TIP: This post shows how to uninstall PowerShell.
Disable PowerShell 7 on Windows
If you have PowerShell 7 on your device, you can disable it by uninstalling it from your Windows PC. Here are the steps you need to follow: Follow the on-screen instructions to uninstall this app. It will remove the app and its related data. This way you can disable the user’s access to PowerShell version 7. Read next: How to turn on or off Windows PowerShell script execution.