Don’t want specific or all users access specific or all drives in Windows? Here’s how to do it using drive security options and Group Policy.
By default, Windows allows users to access drives without much restriction. Users can generally create, modify, and delete files and folders unless they are restricted by user permissions. Generally, this is a good thing, and you don’t have to worry about it. However, there might be situations where you want to prevent users from accessing a specific drive or all drives. For example, maybe you are sharing your PC with someone, but you don’t want them poking through your drives, finding personal data, or deleting/modifying files.
Thankfully, on Windows 11, you have two easy methods to restrict user access to drives. You can either change user permissions to block access, which gives you more control, or use Group Policy to apply a sweeping restriction to all users. In this guide, I will show you both methods. Let’s get started.
Before You Start
- Administrator rights are required to change driver permissions or modify Group Policy settings to restrict user access to drives/partitions.
Change Drive Permissions to Restrict User Access
One way to prevent any user from accessing a specific drive is to change its permissions to disallow access. The advantage of this method is that it gives you more control over the process and allows you to target a specific user rather than impose a blanket ban on all users. In fact, this is the same method we use to restrict folder access to users. Here’s how to do it.
To start off, press the “Windows key + E” shortcut to launch File Explorer. Next, right-click the drive you want to restrict and select “Properties“.
Note: If you don’t see drives in File Explorer after opening it, click the “This PC” option on the left sidebar.

Go to the “Security” tab and click the “Advanced” option.

Now, click the “Change permissions” button at the bottom.

Click the “Add” button.

On this window, click the “Select a principal” option.

Type the user name in the blank box and click the “Check names” button. If the username is correct, Windows will automatically convert it to a proper username. Click the “OK” button to continue.

After adding the user, select “Deny” from the “Type” dropdown menu, select “This folder, subfolders and files” from the “Applies to” dropdown, select the “Full control” checkbox under “Basic permissions,” and click “OK“.

Click “OK” in the “Advanced security” window.
Click “OK” in the “Properties” dialog.
That is it. With that, you’ve restricted a specific user from accessing a specific drive. In my case, I’ve blocked “ShareUser” from accessing the “F drive”.
Restrict or Prevent User Access to Drives using Group Policy
To prevent users from accessing the drives or partitions, we are going to use a simple GPO or Group Policy Object. All we have to do is enable the policy and point it towards the drives you want to restrict.
Important note: While this method allows blanket restrictions for all users on specific or all drives on your computer, it is the weaker option compared to the first method. Mainly because it blocks users’ access to restricted drives from File Explorer and the Run dialog, but knowledgeable users can still access them via the command line or third-party apps. So, if security is paramount to you, follow the first method.
To change a Group Policy object, we need to open the Group Policy Editor. To do that, open the Start menu, search for “Edit Group Policy“, and click on the result to open the Group Policy Editor.

In the Editor, all policies are organized into categories or folders. You can see them on the left panel. Expand the folder structure and go to the following location.
User Configuration > Administrative Templates > Windows Components > File Explorer

Once you are here, find the “Prevent access to drives from My Computer” policy on the right panel and double-click it.

The above action will open its properties window. Here, select the “Enabled” option and select the drives you want to restrict from the dropdown menu under the “Options” section. In my case, I’m restricting access to all drives. Click the “Apply” and “OK” buttons to save changes.

That is it. The policy is applied instantly. From now on, whenever a user, no matter who they are, tries to access a drive, they will be shown the “This operation has been cancelled due to restrictions in effect on this computer. Please contact your system administrator.” message.
Note: If the policy is not applied, either reboot Windows or run the gpupdate /force command as admin to force apply policy settings.

In the future, to restore drive access and fix the “This operation has been cancelled due to restrictions in effect on this computer. Please contact your system administrator.” error message, select “Not configured” or “Disabled” in the “Prevent access to drives from My Computer” policy.

That’s it. It’s that simple to block full drive access to all or specific users in Windows 11 and 10. Write down below if you have any comments, questions, or suggestions. I will respond.
Good to read:
using “Prevent access to drives from My Computer” policy does not prevent the access, it is only a hide! from Windows Search you still can open the drive with full access. As I know you need to disable the Windows Search feature to prevent this.