Windows OS Hub
  • Windows
    • Windows 11
    • Windows 10
    • Windows Server 2025
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
    • Proxmox
  • PowerShell
  • Linux
  • Home
  • About

Windows OS Hub

  • Windows
    • Windows 11
    • Windows 10
    • Windows Server 2025
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
    • Proxmox
  • PowerShell
  • Linux

 Windows OS Hub / Windows 11 / How to Hide a Disk Partition (Drive) in Windows

September 15, 2025

How to Hide a Disk Partition (Drive) in Windows

In Windows, an administrator can hide a specific drive (disk partition) in File Explorer and prevent other users from accessing it.

Contents:
  • Hide Specific Drives in File Explorer via GPO or Registry
  • Remove the Drive Letter Assigned to a Partition

Hide Specific Drives in File Explorer via GPO or Registry

Two Group Policy options allow you to hide specific local drives from users:

  1. Open the local GPO Editor (gpedit.msc)
  2. Navigate to User Configuration -> Administrative Templates -> Windows Components -> File Explorer
  3. Open the Hide these specified drives in My Computer option settings.
  4. With this GPO option, you can hide specific drives (A, B, C, D) or all drives at once. For example, I chose to hide only the C: drive. But this GPO doesn’t allow you to manually specify other drive letters to hide. Hide these specified drives in My Computer - Group Policy option
  5. Save the changes. The Group Policy settings will be applied immediately without requiring a reboot. The drive C: will be hidden from navigation in File Explorer.
  6. However, users can still open this disk by typing its address (drive letter) into the Explorer address bar manually. Accessing hidden drive via path in navigation bar

In the same GPO section, there is another option: Prevent Access to drives from My Computer. Enabling this GPO option and choosing a specific drive in the settings will prevent users from accessing the disk (viewing its contents in File Explorer).

GPO: Prevent Access to drives from My Computer

If a user tries to open any path on a hidden drive, an error will appear:

This operation has been cancelled due to restrictions in effect on this computer. Please contact your system administrator.

This operation has been cancelled due to restrictions in effect on this computer

However, drives hidden in this way will still be visible in third-party apps, such as file managers, archivers, etc. Drives are only hidden in the File Explorer GUI.

These GPO options only allow you to hide predefined drive letters in File Explorer. You can hide an arbitrary letter and block access to a drive through the registry. The following commands are used:

reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoDrives" /t REG_DWORD /d XXXX /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoViewOnDrive" /t REG_DWORD /d XXXX /f

Specify the decimal value from the table below for the drive you want to hide instead of XXXX. To hide multiple drives, sum up their values.

For example, I want to hide drives F and L. According to the table, the sum of the values for them is: 32 + 2048 = 2080. Use this value in the following commands:

reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoDrives" /t REG_DWORD /d 2080 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoViewOnDrive" /t REG_DWORD /d 2080 /f

If you manually edit these parameters in the registry, make sure that the GPO options described above are not set.

enable registry options NoDrives and NoViewOnDrive

Make sure that the drives you specified are hidden in File Explorer.

These registry settings can be deployed via Group Policy Preferences to hide drives on multiple domain computers/servers.

Table of decimal codes for drive letters:

A1
B2
C4
D8
E16
F32
G64
H128
I256
J512
K1024
L2048
M4096
N8192
O16384
P32768
Q65536
R131072
S262144
T524288
U1048576
V2097152
W4194304
X8388608
Y16777216
Z33554432
All drives67108863
The option to hide local drives from users is often used on RDS (terminal) servers. To further restrict a user’s access to the RDS server and prevent them from running File Explorer or other programs, use published RemoteApps.

Remove the Drive Letter Assigned to a Partition

Sometimes, rather than hiding specific drive letters in File Explorer, it makes more sense to simply remove the assigned drive letter from partitions that aren’t being used. For example, in my case, drive letter E: is assigned to the WinRE recovery partition. I want to remove this drive from the File Explorer navigation.

remove a drive from a disk partition

You can remove a drive letter using the Disk Management console:

  1. Open the diskmgmt.msc snap-in
  2. Right-click on the partition whose drive letter you want to remove, then select Change Drive Letter and Paths. remove an assigned drive letter from disk management
  3. A form will appear showing the drive letter assigned to the partition.
  4. Select Remove -> OK.

The drive letter assigned to system partitions (such as the recovery partition) is not displayed in Disk Management. You can remove a drive letter from a disk partition from the command prompt.

  1. Open the CMD as an administrator and run the command: diskpart
  2. List volumes available in Windows: list vol diskpart: list volumes
  3. I want to remove the drive letter from “Volume 3,” which contains a hidden system partition. Select it: sel vol 3
  4. Remove the assigned drive letter: remove letter=E
  5. End the DiskPart session: exit diskpart - remove drive letter

As a result, this partition will no longer show up in File Explorer with its own drive letter.

0 comment
0
Facebook Twitter Google + Pinterest
Questions and AnswersWindows 11Windows Server 2022
previous post
Windows Stucks at ‘Getting Windows Ready, Don’t Turn Off Computer ‘

Related Reading

Configuring RemoteApps Hosted on Windows 10/11 (without Windows...

January 25, 2025

Disable BitLocker Automatic Drive Encryption in Windows 11

October 16, 2024

Disable and Completely Remove Widgets from Taskbar in...

September 26, 2024

Bridging Multiple Network Interfaces on Windows

November 21, 2024

Fix: Windows Update Tab (Button) is Missing from...

December 16, 2024

Check the Software Installation/Removal History in Windows

October 8, 2024

How to Prefer IPv4 over IPv6 in Windows...

April 15, 2025

How to Detect Which User Installed or Removed...

June 25, 2025

Leave a Comment Cancel Reply

join us telegram channel https://t.me/woshub
Join WindowsHub Telegram channel to get the latest updates!

Recent Posts

  • Fix: Slow Startup of PowerShell Console and Scripts

    September 3, 2025
  • DPI Scaling and Font Size in RDP (RDS) Session

    August 27, 2025
  • Proxmox: Share a Host Directory with VMs via VirtioFS

    August 18, 2025
  • How to Find AD Users with Blank Passwords (Password-Not-Required)

    July 24, 2025
  • Run Elevated Commands with Sudo on Windows 11

    July 16, 2025
  • Find a Process Causing High Disk Usage on Windows

    July 15, 2025
  • Fix: Microsoft Defender Not Updating Automatically in Windows

    July 8, 2025
  • Create a Windows Server VM on Proxmox (Step-by-Step)

    July 7, 2025
  • How to Detect Which User Installed or Removed a Program on Windows

    June 23, 2025
  • Encrypt Any Client-Server App Traffic on Windows with Stunnel

    June 12, 2025

Follow us

  • Facebook
  • Twitter
  • Telegram
Popular Posts
  • Fix: Windows Update Tab (Button) is Missing from Settings
  • Permanently Disable Driver Signature Enforcement on Windows 11
  • Fix: Your IT Administrator Has Limited Access to Virus & Threat Protection
  • How to Add or Reinstall the Microsoft PDF Printer on Windows
  • Fix: Multiple Connections to a Server or Shared Resources by the Same User
  • How to Manually Install Any Driver on a Windows Computer
  • Remote Desktop fix: The number of connections to this computer is limited
Footer Logo

@2014 - 2024 - Windows OS Hub. All about operating systems for sysadmins


Back To Top