WPD Devices: Deny read access
Périphériques WPD : refuser l’accès en lecture
Explanation
This policy setting denies read access to removable disks, which may include media players, cellular phones, auxiliary displays, and CE devices.
If you enable this policy setting, read access is denied to this removable storage class.
If you disable or do not configure this policy setting, read access is allowed to this removable storage class.
Ce paramètre de stratégie refuse l’accès en lecture aux disques amovibles, y compris éventuellement aux baladeurs multimédias, aux téléphones cellulaires, aux affichages auxiliaires et aux appareils CE.
Si vous activez ce paramètre de stratégie, l’accès en lecture est refusé à cette classe de stockage amovible.
Si vous désactivez ce paramètre de stratégie ou ne le configurez pas, l’accès en lecture est autorisé pour cette classe de stockage amovible.
Registry
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\RemovableStorageDevices\{6AC27878-A6FA-4155-BA85-F98F491D4F33}- Value name
Deny_Read
| State | Value written | ||||||
|---|---|---|---|---|---|---|---|
| Enabled | REG_DWORD = 1
| ||||||
| Disabled | REG_DWORD = 0
|
PowerShell
PowerShell commands that write to the registry what the policy would write. Values in angle brackets (<…>) must be replaced.
Writing directly to the registry bypasses Group Policy: if a GPO manages this value, it will be rewritten at the next gpupdate; otherwise the value stays in place (the "tattooing" effect). Prefer a GPO or, locally, LGPO.exe. Run PowerShell as administrator for HKLM. Some policies need a restart or gpupdate /force.
Enable
# Enable: RemovableStorage/WPDDevices_DenyRead_Access_2
$k = 'HKLM:\Software\Policies\Microsoft\Windows\RemovableStorageDevices\{6AC27878-A6FA-4155-BA85-F98F491D4F33}'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'Deny_Read' -Value 1 -Type DWord
$k = 'HKLM:\Software\Policies\Microsoft\Windows\RemovableStorageDevices\{F33FDC04-D1AC-4E8E-9A30-19BBD4B108AE}'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'Deny_Read' -Value 1 -Type DWordDisable
# Disable: RemovableStorage/WPDDevices_DenyRead_Access_2
$k = 'HKLM:\Software\Policies\Microsoft\Windows\RemovableStorageDevices\{6AC27878-A6FA-4155-BA85-F98F491D4F33}'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'Deny_Read' -Value 0 -Type DWord
$k = 'HKLM:\Software\Policies\Microsoft\Windows\RemovableStorageDevices\{F33FDC04-D1AC-4E8E-9A30-19BBD4B108AE}'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'Deny_Read' -Value 0 -Type DWordRevert to "Not configured"
# Revert to "Not configured": RemovableStorage/WPDDevices_DenyRead_Access_2
$k = 'HKLM:\Software\Policies\Microsoft\Windows\RemovableStorageDevices\{6AC27878-A6FA-4155-BA85-F98F491D4F33}'
Remove-ItemProperty -Path $k -Name 'Deny_Read' -ErrorAction SilentlyContinue
$k = 'HKLM:\Software\Policies\Microsoft\Windows\RemovableStorageDevices\{F33FDC04-D1AC-4E8E-9A30-19BBD4B108AE}'
Remove-ItemProperty -Path $k -Name 'Deny_Read' -ErrorAction SilentlyContinue