Ouvrir dans l'explorateur

Empêcher les utilisateurs de remplacer l’invite de commandes par Windows PowerShell dans le menu affiché quand ils cliquent avec le bouton droit dans l’angle inférieur gauche ou qu’ils appuient sur la touche Windows+X

Prevent users from replacing the Command Prompt with Windows PowerShell in the menu they see when they right-click the lower-left corner or press the Windows logo key+X

Type
Utilisateur
Chemin GPO
Configuration utilisateur › Stratégies › Modèles d'administration › Composants Windows › Interface utilisateur latérale EN : User Configuration › Policies › Administrative Templates › Windows Components › Edge UI
Pris en charge sur
Au minimum Windows Server 2012 R2, Windows 8.1 ou Windows RT 8.1 EN : At least Windows Server 2012 R2, Windows 8.1 or Windows RT 8.1
Fichier ADMX
EdgeUI.admx
Nom interne
EdgeUI/ShowCommandPromptOnWinX

Explication

Texte français issu de Windows 11 26H2

Ce paramètre de stratégie vous permet d’empêcher les utilisateurs de remplacer l’invite de commandes par Windows PowerShell dans le menu affiché quand ils cliquent avec le bouton droit dans l’angle inférieur gauche ou qu’ils appuient sur la touche Windows+X.

Si vous activez ce paramètre de stratégie, l'invite de commandes figure toujours dans ce menu et les utilisateurs ne peuvent pas la remplacer par Windows PowerShell. Les utilisateurs peuvent toujours accéder à Windows PowerShell, mais pas depuis ce menu.

Si vous désactivez ce paramètre de stratégie ou si vous ne le configurez pas, l’invite de commandes figure dans le menu par défaut et les utilisateurs peuvent configurer ce paramètre.

This policy setting allows you to prevent users from replacing the Command Prompt with Windows PowerShell in the menu they see when they right-click the lower-left corner or press the Windows logo key + X.

If you enable this policy setting, the Command Prompt will always be listed in that menu, and users won't be able to replace it with Windows PowerShell. Users will still be able to access Windows PowerShell, but not from that menu.

If you disable or don't configure this policy setting, Command Prompt will be listed in the menu by default, and users can configure this setting.

Registre

HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\EdgeUI
Nom de la valeur
ShowCommandPromptOnWinX
ÉtatValeur écrite
ActivéREG_DWORD = 1
DésactivéREG_DWORD = 0

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 : EdgeUI/ShowCommandPromptOnWinX
$k = 'HKCU:\Software\Policies\Microsoft\Windows\EdgeUI'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'ShowCommandPromptOnWinX' -Value 1 -Type DWord

Désactiver

# Désactiver : EdgeUI/ShowCommandPromptOnWinX
$k = 'HKCU:\Software\Policies\Microsoft\Windows\EdgeUI'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'ShowCommandPromptOnWinX' -Value 0 -Type DWord

Revenir à « Non configuré »

# Revenir à « Non configuré » : EdgeUI/ShowCommandPromptOnWinX
$k = 'HKCU:\Software\Policies\Microsoft\Windows\EdgeUI'
Remove-ItemProperty -Path $k -Name 'ShowCommandPromptOnWinX' -ErrorAction SilentlyContinue

Disponibilité