Disable predefined commands
Cette stratégie n'a pas de traduction française dans les modèles de l'éditeur ; le texte original est en anglais.
Explication
This policy setting allows you to disable specific command bar buttons and menu items in the specified applications.
If you enable this policy setting you can disable specific command bar buttons and menu items in the user interface for the selected application. The predefined list of command bar buttons and menu items you can disable becomes available to you when you enable this policy setting.
If you disable or do not configure this policy setting, the predefined list of command bar buttons and menu items are enabled for the application.
Registre
HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\excel\disabledcmdbaritemscheckboxes- Nom de la valeur
- non défini dans l'ADMX
| État | Valeur écrite | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Activé | non défini dans l'ADMX (voir les options ci-dessous) | |||||||||||||||
| Désactivé |
|
PowerShell
Commandes PowerShell qui écrivent dans le registre ce que la stratégie écrirait. Les valeurs entre chevrons (<…>) sont à remplacer.
Écrire directement dans le registre contourne la stratégie de groupe : si une GPO gère cette valeur, elle sera réécrite au prochain gpupdate ; sinon la valeur reste en place (effet « tatouage »). Préférez une GPO ou, en local, LGPO.exe. Exécutez PowerShell en administrateur pour HKLM. Certaines stratégies demandent un redémarrage ou gpupdate /force.
Activer
# Activer : excel16/L_Disablecommandbarbuttonsandmenuitems
$k = 'HKCU:\software\policies\microsoft\office\16.0\excel\disabledcmdbaritemscheckboxes'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# File tab | Options | Customize Ribbon | All Commands | Web Page Preview
# décoché : 0
Set-ItemProperty -Path $k -Name 'filewebpagepreview' -Value '3655' -Type String
# File tab | Share | Email
# décoché : 0
Set-ItemProperty -Path $k -Name 'sendtomailrecipient' -Value '2188' -Type String
# Insert tab | Links | Hyperlink
# décoché : 0
Set-ItemProperty -Path $k -Name 'inserthyperlink' -Value '1576' -Type String
# Review tab | Changes | Protect Sheet
# décoché : 0
Set-ItemProperty -Path $k -Name 'toolsprotectsheet' -Value '893' -Type String
# Review tab | Changes | Protect Workbook
# décoché : 0
Set-ItemProperty -Path $k -Name 'flyoutanchorprotectworkbookmenu' -Value '16132' -Type String
# Review tab | Changes | Protect and Share Workbook
# décoché : 0
Set-ItemProperty -Path $k -Name 'toolsprotectshare' -Value '3059' -Type String
# View tab | Macros | Macros
# décoché : 0
Set-ItemProperty -Path $k -Name 'flyoutanchormacros' -Value '16106' -Type String
# Developer tab | Code | Macros
# décoché : 0
Set-ItemProperty -Path $k -Name 'toolsmacromacros' -Value '186' -Type String
# Developer tab | Code | Record Macro
# décoché : 0
Set-ItemProperty -Path $k -Name 'toolsmacrorecord' -Value '184' -Type String
# Developer tab | Code | Macro Security
# décoché : 0
Set-ItemProperty -Path $k -Name 'toolsmacrosecurity' -Value '3627' -Type String
# Developer tab | Code | Visual Basic
# décoché : 0
Set-ItemProperty -Path $k -Name 'toolsmacrovbe' -Value '1695' -Type String
# File tab | Options | Customize Ribbon | All Commands | Document Location
# décoché : 0
Set-ItemProperty -Path $k -Name 'webaddress' -Value '1740' -Type StringDésactiver
# Désactiver : excel16/L_Disablecommandbarbuttonsandmenuitems
$k = 'HKCU:\software\policies\microsoft\office\16.0\excel\disabledcmdbaritemscheckboxes'
Remove-ItemProperty -Path $k -Name 'filepublishaswebpage' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'weboptions' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'generaloptions' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'fileopensearchtheweb' -ErrorAction SilentlyContinueRevenir à « Non configuré »
# Revenir à « Non configuré » : excel16/L_Disablecommandbarbuttonsandmenuitems
$k = 'HKCU:\software\policies\microsoft\office\16.0\excel\disabledcmdbaritemscheckboxes'
Remove-ItemProperty -Path $k -Name 'filepublishaswebpage' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'weboptions' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'generaloptions' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'fileopensearchtheweb' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'filewebpagepreview' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'sendtomailrecipient' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'inserthyperlink' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'toolsprotectsheet' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'flyoutanchorprotectworkbookmenu' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'toolsprotectshare' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'flyoutanchormacros' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'toolsmacromacros' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'toolsmacrorecord' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'toolsmacrosecurity' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'toolsmacrovbe' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'webaddress' -ErrorAction SilentlyContinueOptions (12)
| Libellé | Contrôle | Valeur de registre | Type REG | Contraintes / détails |
|---|---|---|---|---|
| File tab | Options | Customize Ribbon | All Commands | Web Page PreviewL_OfficeButtonxcelOptionsCustomizationCombinedPreviewWebPagePreview | Case à cocherboolean | filewebpagepreview | REG_SZ | Coché : REG_SZ = 3655Décoché : REG_SZ = 0 |
| File tab | Share | EmailL_OfficeButtonExcelOptionsCustomizationMailRecipient | Case à cocherboolean | sendtomailrecipient | REG_SZ | Coché : REG_SZ = 2188Décoché : REG_SZ = 0 |
| Insert tab | Links | HyperlinkL_InsertLinksHyperlink | Case à cocherboolean | inserthyperlink | REG_SZ | Coché : REG_SZ = 1576Décoché : REG_SZ = 0 |
| Review tab | Changes | Protect SheetL_ReviewChangesProtectSheet | Case à cocherboolean | toolsprotectsheet | REG_SZ | Coché : REG_SZ = 893Décoché : REG_SZ = 0 |
| Review tab | Changes | Protect WorkbookL_ReviewChangesProtectWorkbook | Case à cocherboolean | flyoutanchorprotectworkbookmenu | REG_SZ | Coché : REG_SZ = 16132Décoché : REG_SZ = 0 |
| Review tab | Changes | Protect and Share WorkbookL_ReviewChangesProtectSharing | Case à cocherboolean | toolsprotectshare | REG_SZ | Coché : REG_SZ = 3059Décoché : REG_SZ = 0 |
| View tab | Macros | MacrosL_ViewMacrosMacros | Case à cocherboolean | flyoutanchormacros | REG_SZ | Coché : REG_SZ = 16106Décoché : REG_SZ = 0 |
| Developer tab | Code | MacrosL_DeveloperCodeMacros | Case à cocherboolean | toolsmacromacros | REG_SZ | Coché : REG_SZ = 186Décoché : REG_SZ = 0 |
| Developer tab | Code | Record MacroL_DeveloperCodeRecordMacro | Case à cocherboolean | toolsmacrorecord | REG_SZ | Coché : REG_SZ = 184Décoché : REG_SZ = 0 |
| Developer tab | Code | Macro SecurityL_DeveloperCodemacroSecurity | Case à cocherboolean | toolsmacrosecurity | REG_SZ | Coché : REG_SZ = 3627Décoché : REG_SZ = 0 |
| Developer tab | Code | Visual BasicL_DeveloperCodeVisualbasic | Case à cocherboolean | toolsmacrovbe | REG_SZ | Coché : REG_SZ = 1695Décoché : REG_SZ = 0 |
| File tab | Options | Customize Ribbon | All Commands | Document LocationL_OfficeButtonExcelOptionsCustomizeDocumentLocation | Case à cocherboolean | webaddress | REG_SZ | Coché : REG_SZ = 1740Décoché : REG_SZ = 0 |
Application
Microsoft 365 Apps / Office (Microsoft) — modèles de novembre 2026
Modèles officiels téléchargés le 12 novembre 2026.