Group Policy compounding method for Windows Server R2 control site hiding and restricting access to any drive letter

Source: Internet
Author: User

Setting items for domain-controlled hidden drive characters

In 组策略管理编辑器 , open the user configuration → policies → Administrative templates →windows component →windows Explorer, which has two items:

    1. Hide these specified drives in My Computer
    2. Prevent access to drives from my computer

Set only * The first item will allow the drive character to disappear in the Explorer window, but you can still access the disk by opening the file location of the shortcut , and setting the second item * both to hide the drive letter and to prevent the user from accessing the disk directly in the resource manager through other means.

System default configuration scheme

In the edit window of both of these options, the discovery system provides only the following scenarios by default:

    • Limit A and B only
    • Limit c only
    • Limit D only
    • Limit ABC only
    • Limit ABCD only
    • Restrict all disks
    • No Limit

If you need to limit the combination of the drive letter to exist, then enable the selection, but generally do not meet the requirements.

To add a method that restricts any disk options

To restrict all disks except the E disk, for example:

1. Copying template files

Copy the folder below the * * C:\Windows\ path PolicyDefinitions to the C:\Windows\SYSVOL\sysvol\xxx.com\Policies * * Path ( XXX.com is the name of the domain network set, assuming the system disk is C disk;

2. Modify the template file

Locate the file in * * C:\Windows\SYSVOL\sysvol\xxx.com\Policies\PolicyDefinitions, WindowsExplorer.admx open it with Notepad, and look for "NoDrives" * *, Locate the following code snippet:

  
 
  1. <policy name = "NoDrives" Span class= "ATN" >class = "User" displayname = "$" (string. NoDrives) " explaintext = "$" (string. NODRIVES_HELP) " presentation = "$ (presentation. NoDrives) " key = "Software\microsoft\windows\currentversion\policies\explorer" >
  2. <parentCategory ref="windows:WindowsExplorer" />
  3. <supportedOn ref="windows:SUPPORTED_Win2k" />
  4. <elements>
  5. <enum id="NoDrivesDropdown" valueName="NoDrives" required="true">
  6. <item displayName="$(string.ABOnly)">
  7. <value>
  8. <decimal value="3" />
  9. </value>
  10. </item>
  11. <item displayName="$(string.COnly)">
  12. <value>
  13. <decimal value="4" />
  14. </value>
  15. </item>
  16. <item displayName="$(string.DOnly)">
  17. <value>
  18. <decimal value="8" />
  19. </value>
  20. </item>
  21. <item displayName="$(string.ABConly)">
  22. <value>
  23. <decimal value="7" />
  24. </value>
  25. </item>
  26. <item displayName="$(string.ABCDOnly)">
  27. <value>
  28. <decimal value="15" />
  29. </value>
  30. </item>
  31. <item displayName="$(string.ALLDrives)">
  32. <value>
  33. <decimal value="67108863" />
  34. </value>
  35. </item>
  36. <item displayName="$(string.RestNoDrives)">
  37. <value>
  38. <decimal value="0" />
  39. </value>
  40. </item>
  41. </enum>
  42. </elements>
  43. </policy>

Add a paragraph to the displayName Note:

  
 
  1. <item displayName="$(string.NotE)">
  2. <value>
  3. <decimal value="67108847" />
  4. </value>
  5. </item>

valueCalculation of:

Low, bits on (1 bit per drive)

Can be seen:

value value (binary) represents the limit of the drive letter
3 11 Ab
4 100 C
8 1000 D
7 111 Abc
67108863 1..1 (26) ALLDrives

That is, a 26-bit binary number represents a combination of 26 drive characters:

    • The lowest digit represents a, the highest digit represents z;
    • Each digit represents a drive letter, which is limited to 1 for the drive letter, and 0 for No limit

Therefore, to set only allow access to the E-drive, which is to restrict all drive characters except E, the binary number should be:

Zyxwvutsrqponmlkjihgfedcba
11 1111 1111 1111 1111 1110 1111

Converted to decimal, the resulting value value should be: 67108847

3. The final step

For a system that uses Chinese, the file is found in * * * * C:\Windows\SYSVOL\sysvol\xxx.com\Policies\PolicyDefinitions\zh-CN, WindowsExplorer.adml also opened with Notepad, Find the following stringtable code snippet:

  
 
  1. <stringTable>
  2. <string id="ABCDOnly">仅限制驱动器 A、B、C 和 D</string>
  3. <string id="ABConly">仅限制驱动器 A、B 和 C</string>
  4. <string id="ABOnly">仅限制驱动器 A 和 B</string>
  5. <string id="ALLDrives">限制所有驱动器</string>
  6. <string id="ClassicShell">启用经典外观</string>
  7. <string id="ClassicShell_Help">此设置允许管理员将特定的 Windows Shell 行为还原到经典外观行为。

Add a sentence in it:

 
   
  
  1. <string id="NotE">限制除E外所有驱动器</string>

Finally, go to 隐藏“我的电脑”中的这些指定的驱动器 and 防止从“我的电脑”访问驱动器 Select Enable Just added * * To restrict all drives except e * *.



From for notes (Wiz)

Windows Server R2 Controls how the site hides and restricts access to any drive letter Group Policy compounding method

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.