Prevent Media Sharing
Empêcher le partage de médias
Explanation
This policy setting allows you to prevent media sharing from Windows Media Player.
If you enable this policy setting, any user on this computer is prevented from sharing digital media content from Windows Media Player with other computers and devices that are on the same network. Media sharing is disabled from Windows Media Player or from programs that depend on the Player's media sharing feature.
If you disable or do not configure this policy setting, anyone using Windows Media Player can turn media sharing on or off.
Ce paramètre de stratégie permet d’empêcher le partage de médias depuis le Lecteur Windows Media.
Si vous activez ce paramètre de stratégie, aucun utilisateur de l’ordinateur ne peut partager le contenu multimédia numérique du Lecteur Windows Media avec d’autres ordinateurs ou périphériques du même réseau. Le partage de médias est désactivé depuis le Lecteur Windows Media ou depuis des programmes qui dépendent de la fonctionnalité de partage de médias du Lecteur.
Si vous désactivez ce paramètre de stratégie ou ne le configurez pas, quiconque utilise le Lecteur Windows Media peut activer ou désactiver le partage de médias.
Registry
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\WindowsMediaPlayer- Value name
PreventLibrarySharing
| 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: windowsmediaplayer/PreventLibrarySharing
$k = 'HKLM:\Software\Policies\Microsoft\WindowsMediaPlayer'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'PreventLibrarySharing' -Value 1 -Type DWordDisable
# Disable: windowsmediaplayer/PreventLibrarySharing
$k = 'HKLM:\Software\Policies\Microsoft\WindowsMediaPlayer'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'PreventLibrarySharing' -Value 0 -Type DWordRevert to "Not configured"
# Revert to "Not configured": windowsmediaplayer/PreventLibrarySharing
$k = 'HKLM:\Software\Policies\Microsoft\WindowsMediaPlayer'
Remove-ItemProperty -Path $k -Name 'PreventLibrarySharing' -ErrorAction SilentlyContinue