There is the a built-in policy for this called Hide these specified drives in my computer, however they can only do the following:

  • Restrict A and B drives only
  • Restrict C drive only
  • Restrict D drive only
  • Restrict A, B and C drives only
  • Restrict A, B, C and D drives only
  • Restrict all drives
  • Do not restrict¬†drives

As you may use different letters such as S drive you can create a .ADM file to hide the drive.

How this works, Each letter is assigned a number base on binary location, to be able to block multiple drives you need to add the values of those drives together

Drive Letter Value
A
1
B
2
C
4
D
8
E
16
F
32
G
64
H
128
I
256
J
512
K
1024
L
2048
M
4096
N
8192
O
16384
P
32768
Q
65536
R
131072
S
262144
T
524288
U
1048576
V
2097152
W
4194304
X
8388608
Y
16777216
Z
33554432
ALL
67108863

Example: Block A & D = 9

To Create the administrative template open notepad and paste the following (this is the with the example mentioned above), then save the files as HideDriveBlockAD.adm or you can change it to match.

CLASS USER

CATEGORY !!HideDrives

KEYNAME Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
POLICY !!HideDrives

PART !!HideDrivesDropdown DROPDOWNLIST NOSORT REQUIRED
VALUENAME “NoDrives”
ITEMLIST
NAME !!ABOnly VALUE NUMERIC 3
NAME !!COnly VALUE NUMERIC 4
NAME !!DOnly VALUE NUMERIC 8
NAME !!ABConly VALUE NUMERIC 7
NAME !!ABCDOnly VALUE NUMERIC 15
NAME !!HideACE VALUE NUMERIC 21
NAME !!HideCE VALUE NUMERIC 20
NAME !!HideCDE VALUE NUMERIC 28
NAME !!HideACEF VALUE NUMERIC 53
NAME !!HideCEF VALUE NUMERIC 52
NAME !!ALLDrives VALUE NUMERIC 67108863 DEFAULT
NAME !!RestNoDrives VALUE NUMERIC 0
NAME !!ExampleBlockAD VALUE NUMERIC 9
END ITEMLIST
END PART
END POLICY

END CATEGORY;HideDrives

[strings]
Blank=” ”
ABCDOnly=”Restrict A, B, C and D drives only”
ABConly=”Restrict A, B and C drives only”
ABOnly=”Restrict A and B drives only”
ALLDrives=”Restrict all drives”
COnly=”Restrict C drive only”
DOnly=”Restrict D drive only”
HideACEF=”Restrict A,C,E and F drives only”
HideCDE=”Restrict C, D and E drives only”
HideACE=”Restrict A, C and E drives only”
HideCE=”Restrict C and E drives only”
HideCEF=”Restrict C, E and F drives only”
HideDrives=”Hide Drives”
HideDrivesDropdown=”Hide Drives Selection”
MoveProfile=”Move Profiles”
MoveProfileDropdown=”Move User Profile Location”
MOVEPROFILETOD=”Move Profile to D Drive”
RestNoDrives=”Restore Drives”
ExampleBlockAD=”Example Block A and D”

How to import the ADM file

  1. Open Group Policy Management Editor (create a new object to get to this screen)
  2. Expand User Configuration
  3. Right click on Administrative Template and select Add/Remove Templates
  4. Click on and browse to the location where you saved the ADM file created above and click Open
  5. Once imported you can select it and enable it and select the value you added, for instance, “Example Block A and D”