Add Logoff to the Start Menu
Ajouter l’option Fermeture de session au menu Démarrer
Explanation
This policy only applies to the classic version of the start menu and does not affect the new style start menu.
Adds the "Log Off <username>" item to the Start menu and prevents users from removing it.
If you enable this setting, the Log Off <username> item appears in the Start menu. This setting also removes the Display Logoff item from Start Menu Options. As a result, users cannot remove the Log Off <username> item from the Start Menu.
If you disable this setting or do not configure it, users can use the Display Logoff item to add and remove the Log Off item.
This setting affects the Start menu only. It does not affect the Log Off item on the Windows Security dialog box that appears when you press Ctrl+Alt+Del.
Note: To add or remove the Log Off item on a computer, click Start, click Settings, click Taskbar and Start Menu, click the Start Menu Options tab, and then, in the Start Menu Settings box, click Display Logoff.
Also, see "Remove Logoff" in User Configuration\Administrative Templates\System\Logon/Logoff.
Cette stratégie ne s’applique qu’à la version classique du menu Démarrer et n’affecte pas le nouveau style du menu Démarrer.
Ajoute l’élément « Fermer la session <nom d’utilisateur> » au menu Démarrer et empêche les utilisateurs de le supprimer.
Si vous activez ce paramètre, l’élément Fermer la session <nom d’utilisateur> s’affiche dans le menu Démarrer. Ce paramètre supprime également l’élément Afficher l’invite de fermeture de session des options du menu Démarrer. Par conséquent, les utilisateurs ne peuvent pas supprimer l’élément Fermer la session <nom d’utilisateur> du menu Démarrer.
Si vous désactivez ce paramètre, ou si vous ne le configurez pas, les utilisateurs peuvent utiliser l’élément Afficher l’invite de fermeture de session pour ajouter et supprimer l’élément Fermer la session.
Ce paramètre affecte uniquement le menu Démarrer. Il n’affecte pas l’élément Fermer la session dans la boîte de dialogue Sécurité de Windows qui apparaît lorsque vous appuyez sur Ctrl+Alt+Suppr.
Remarque : pour ajouter ou supprimer l’élément Fermer la session sur un ordinateur, cliquez sur Démarrer, sur Paramètres, sur Barre des tâches et menu Démarrer, sur l’onglet Options avancées du menu Démarrer, puis cliquez dans la zone Paramètres du menu Démarrer sur Afficher l’invite de fermeture de session.
Consultez également « Supprimer la fermeture de session » dans Configuration utilisateur\Modèles d’administration\Système\Ouverture/fermeture de session.
Registry
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer- Value name
ForceStartMenuLogOff
| State | Value written |
|---|---|
| Enabled | not defined in the ADMX |
| Disabled | not defined in the ADMX |
PowerShell
PowerShell commands that write to the registry what the policy would write. Values in angle brackets (<…>) must be replaced.
The ADMX does not specify the value written when enabled; the GPO editor usually writes REG_DWORD 1 (enabled) / 0 (disabled). The commands below use 1/0 as an assumption.
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: StartMenu/ForceStartMenuLogOff
$k = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# The ADMX does not specify the value written; the GPO editor usually writes REG_DWORD 1 (enabled) / 0 (disabled)
Set-ItemProperty -Path $k -Name 'ForceStartMenuLogOff' -Value 1 -Type DWord # assumed value (not defined in the ADMX)Disable
# Disable: StartMenu/ForceStartMenuLogOff
$k = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# The ADMX does not specify the value written; the GPO editor usually writes REG_DWORD 1 (enabled) / 0 (disabled)
Set-ItemProperty -Path $k -Name 'ForceStartMenuLogOff' -Value 0 -Type DWord # assumed value (not defined in the ADMX)Revert to "Not configured"
# Revert to "Not configured": StartMenu/ForceStartMenuLogOff
$k = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer'
Remove-ItemProperty -Path $k -Name 'ForceStartMenuLogOff' -ErrorAction SilentlyContinue