Configura il comportamento del comando sudo: valore del Registro di sistema EnabledComputerHKLM\Software\Policies\Microsoft\Windows\Sudo
- ID criterio
- EnableSudo
- Ambito
- Configurazione computer
- Supportato in
- Almeno Windows 11
- Origine
- Administrative Templates (.admx) for Windows 11 2026 Update (26H2) (versione 1.0)
- Categoria
- Sistema
Registro
Enabled
REG_DWORDComputerHKLM\Software\Policies\Microsoft\Windows\Sudo Chiave corrente
- Valore abilitato
- Dipende dal valore dell'opzione
- Elemento
- Modalità sudo massima consentita
| Voce | Valore memorizzato |
|---|---|
| Disabilitato | 0 |
| Forza nuova finestra | 1 |
| Disabilita input | 2 |
| Normale | 3 |
Applica con .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Sudo] ; Opzioni (usarne solo una) ; Disabilitato "Enabled"=dword:00000000 ; Forza nuova finestra "Enabled"=dword:00000001 ; Disabilita input "Enabled"=dword:00000002 ; Normale "Enabled"=dword:00000003
CMD
:: Opzioni (usarne solo una) :: Disabilitato reg add "HKLM\Software\Policies\Microsoft\Windows\Sudo" /v "Enabled" /t REG_DWORD /d 0 /f :: Forza nuova finestra reg add "HKLM\Software\Policies\Microsoft\Windows\Sudo" /v "Enabled" /t REG_DWORD /d 1 /f :: Disabilita input reg add "HKLM\Software\Policies\Microsoft\Windows\Sudo" /v "Enabled" /t REG_DWORD /d 2 /f :: Normale reg add "HKLM\Software\Policies\Microsoft\Windows\Sudo" /v "Enabled" /t REG_DWORD /d 3 /f
PowerShell
# Comune: crea la chiave New-Item -Path 'HKLM:\Software\Policies\Microsoft\Windows\Sudo' -Force | Out-Null # Opzioni (usarne solo una) # Disabilitato New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\Sudo' -Name 'Enabled' -PropertyType DWord -Value 0 -Force | Out-Null # Forza nuova finestra New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\Sudo' -Name 'Enabled' -PropertyType DWord -Value 1 -Force | Out-Null # Disabilita input New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\Sudo' -Name 'Enabled' -PropertyType DWord -Value 2 -Force | Out-Null # Normale New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\Sudo' -Name 'Enabled' -PropertyType DWord -Value 3 -Force | Out-Null