Home » How To » How to Disable PowerShell Completely on Windows 10 (GPO)

How to Enable or Disable PowerShell on Windows 10 & 11

PowerShell is the built-in scripting language and command-line shell generally used for system administration, system configuration, and automation. By default, PowerShell is enabled and available to all users. This makes it easy to run commands and scripts. However, there might be times when you need to disable PowerShell and restrict the user’s ability to run PowerShell scripts and commands. In this tutorial, we’ll show you the simplest way to disable PowerShell. Of course, we’ll also show you how to enable it back so that you and other users can use it again. Let’s get started.

Note: To disable PowerShell 2.0. i.e., an older version of PowerShell, follow the linked guide.

Note: You should be using the Pro or Enterprise version to follow the steps below. The home version doesn’t include the Local Security Policy module.

Note: You need administrative rights.

How to Disable PowerShell on Windows 10 & 11

To disable and restrict users from using PowerShell, we will use Windows Local Security Policies.

1. Open the Start menu. You can click on the start icon or press the Windows key.

2. Search for Local Security Policy and click on the top result.

3. Right-click on the Software Restriction Policies folder on the sidebar.

4. Select New Software Restriction Policies. This will automatically add additional folders under it.

right-click on software restriction policies and select new software restrictions policies

5. Expand the Software Restriction Policies folder by double-clicking on it.

6. Right-click on the Additional Rules folder.

7. Select the New Hash Rule option.

select new hash rule

8. Click the Browse button under the General tab.

click browse

9. Go to the following location in the Browse window.


Note: Even though the folder path suggests you are using PowerShell v1.0, it is a bit misleading. This directory structure is maintained for backward compatibility and does not reflect the actual version of PowerShell installed on the system. To know your current PowerShell version, run the $PSVersionTable command in the PowerShell window.

10. Select the PowerShell.exe file and click Open.

select PowerShell exe file

11. Click the Apply and OK buttons.

click apply

12. Close the Local Security Policies window.

13. Restart Windows.

After restarting, any time a user tries to open PowerShell or run PowerShell scripts, Windows will block it according to the local security policies and show the “This app has been blocked by your system administrator” error message.

PowerShell blocked error message

(Optional) Let Administrators Access PowerShell

Once the PowerShell is disabled, you can also allow certain users, like administrators, to access the PowerShell using exceptions. It is a bit advanced and you need to know about Active Directory and User Delegation. Here’s how to create them.

First, create a custom Active Directory Security Group in the Group Policy Management console. Next, add all users you want to exclude to that security group. Then delegate them to the policy we created in the steps above.

Once you do that, only the users in the security group can open the PowerShell, and all other users are automatically blocked/restricted.

How to Enable PowerShell on Windows 10 & 11

To enable PowerShell and let users access it again, you must delete the software restriction policy. Here’s how.

1. Open Local Security Policies by searching in the start menu.

2. Expand the Software Restriction Policies folder.

3. Select Additional Rules.

4. Right-click on the PowerShell policy and select Delete.

right-click on policy and select delete

5. Click “Yes” in the warning window.

6. Close the Local Security Policy window.

7. Restart Windows.

PowerShell is automatically after restarting your computer. From this point any user in your computer open and use PowerShell to execute commands and scripts.

And there you have it! It’s that simple to enable or disable PowerShell to stop users from opening and using it. If you have any questions, comment below and we’ll answer.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top