When you don’t want users to access certain or all drives, you can use GPO to quickly restrict access. Steps to prevent user access to drives.
By default, Windows allows almost any user to access any drive or file without any restrictions whatsoever. Of course, depending on the drive, like the C drive, Windows may place some restrictions so as to prevent users from modifying or deleting the data. Generally, this is not a big issue for the most part. However, there might be times when you want to prevent user access to a particular drive or all drives for that matter. For example, maybe you are sharing your PC with someone but you don’t want them poking through drives and finding personal data. In those cases, you can use a simple GPO to prevent users from accessing drives in Windows.
So, if you ever need, follow the below steps to prevent user access to drives in Windows 10.
Note: The steps demonstrated below can be followed in Windows 7 and 8 too.
Steps to Restrict or Prevent User Access to Drives
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 enabled and policy and point it towards the drives you want to restrict.
1. Since we need 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.
2. In the Editor, all the policies are divided into different 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
Note: If you are on Windows 7 (please update), look for “Windows Explorer” folder under “Windows Components”.
3. Once you are here, find the “Prevent access to drives from My Computer” policy on the right panel and double-click on it.
4. 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 on 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 it is, tries to access a drive, they will be shown this error message.
Note: If the policy is not applied, either reboot Windows or execute
gpupdate /force command as admin to force apply policy settings.
To restore drive access, go through the same steps but select “Not configured” or “Disabled” in the policy properties window in step 4.
I hope that helps. If you are stuck or need some help, comment below and I will try to help as much as possible. If you like this article, do check out how to lock a folder in Windows and how to password protect a ZIP file in Windows.