Display a custom message title when device installation is prevented by a policy setting
Afficher un message personnalisé lorsque l’installation d’un périphérique est empêchée par un paramètre de stratégie
Explanation
This policy setting allows you to display a custom message title in a notification when a device installation is attempted and a policy setting prevents the installation.
If you enable this policy setting, Windows displays the text you type in the Main Text box as the title text of a notification when a policy setting prevents device installation.
If you disable or do not configure this policy setting, Windows displays a default title in a notification when a policy setting prevents device installation.
Ce paramètre de stratégie permet d’afficher un message personnalisé dans le titre d’une notification lorsqu’un paramètre de stratégie empêche l’installation d’un périphérique.
Si vous activez ce paramètre de stratégie, Windows affiche le texte que vous avez tapé dans la zone Texte principal en guise de titre d’une notification chaque fois qu’un paramètre de stratégie empêche l’installation d’un périphérique.
Si vous désactivez ce paramètre de stratégie ou ne le configurez pas, Windows affiche un titre par défaut dans une notification chaque fois qu’un paramètre de stratégie empêche l’installation d’un périphérique.
Registry
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\DeviceInstall\Restrictions\DeniedPolicy- Value name
- not defined in the ADMX
Enable / disable values: not defined in the ADMX (see the options below).
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: DeviceInstallation/DeviceInstall_DeniedPolicy_SimpleText
$k = 'HKLM:\Software\Policies\Microsoft\Windows\DeviceInstall\Restrictions\DeniedPolicy'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# Main Text
Set-ItemProperty -Path $k -Name 'SimpleText' -Value '<value>' -Type StringDisable
# Disable: DeviceInstallation/DeviceInstall_DeniedPolicy_SimpleText
# No value is written in the "Disabled" state (nothing defined in the ADMX)Revert to "Not configured"
# Revert to "Not configured": DeviceInstallation/DeviceInstall_DeniedPolicy_SimpleText
$k = 'HKLM:\Software\Policies\Microsoft\Windows\DeviceInstall\Restrictions\DeniedPolicy'
Remove-ItemProperty -Path $k -Name 'SimpleText' -ErrorAction SilentlyContinueOptions (1)
| Label | Control | Registry value | REG type | Constraints / details |
|---|---|---|---|---|
| Main TextTexte principalDeviceInstall_DeniedPolicy_SimpleText_Text | Text boxtext | SimpleText | REG_SZ | Required · Max length: 63 |