Empêcher le partage de médias : valeur de Registre PreventLibrarySharingOrdinateurHKLM\Software\Policies\Microsoft\WindowsMediaPlayer

ID de stratégie
PreventLibrarySharing
Étendue
Configuration ordinateur
Pris en charge sur
Lecteur Windows Media 11 pour Windows XP ou Lecteur Windows Media 11 pour Windows Vista ou version ultérieure.
Source
Administrative Templates (.admx) for Windows 11 2026 Update (26H2) (version 1.0)
Catégorie
Composants Windows › Lecteur Windows Media

Registre

PreventLibrarySharing

REG_DWORDOrdinateur
Valeur si activée
1
Valeur si désactivée
0
Appliquer avec .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\WindowsMediaPlayer]

; Options (en utiliser une seule)
; Activé
"PreventLibrarySharing"=dword:00000001
; Désactivé
"PreventLibrarySharing"=dword:00000000
CMD
:: Options (en utiliser une seule)

:: Activé
reg add "HKLM\Software\Policies\Microsoft\WindowsMediaPlayer" /v "PreventLibrarySharing" /t REG_DWORD /d 1 /f
:: Désactivé
reg add "HKLM\Software\Policies\Microsoft\WindowsMediaPlayer" /v "PreventLibrarySharing" /t REG_DWORD /d 0 /f
PowerShell
# Commun : créer la clé
New-Item -Path 'HKLM:\Software\Policies\Microsoft\WindowsMediaPlayer' -Force | Out-Null

# Options (en utiliser une seule)
# Activé
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\WindowsMediaPlayer' -Name 'PreventLibrarySharing' -PropertyType DWord -Value 1 -Force | Out-Null
# Désactivé
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\WindowsMediaPlayer' -Name 'PreventLibrarySharing' -PropertyType DWord -Value 0 -Force | Out-Null