Het gedrag van de sudo-opdracht configureren: registerwaarde EnabledComputerHKLM\Software\Policies\Microsoft\Windows\Sudo
- Beleids-ID
- EnableSudo
- Bereik
- Computerconfiguratie
- Ondersteund op
- Minimaal Windows 11
- Bron
- Administrative Templates (.admx) for Windows 11 2026 Update (26H2) (versie 1.0)
- Categorie
- Systeem
Register
Enabled
REG_DWORDComputerHKLM\Software\Policies\Microsoft\Windows\Sudo Huidige sleutel
- Waarde bij ingeschakeld
- Afhankelijk van de waarde van de optie
- Element
- Maximaal toegestane sudo-modus
| Item | Opgeslagen waarde |
|---|---|
| Uitgeschakeld | 0 |
| Nieuw venster forceren | 1 |
| Invoer uitschakelen | 2 |
| Normaal | 3 |
Toepassen met .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Sudo] ; Opties (gebruik er maar één) ; Uitgeschakeld "Enabled"=dword:00000000 ; Nieuw venster forceren "Enabled"=dword:00000001 ; Invoer uitschakelen "Enabled"=dword:00000002 ; Normaal "Enabled"=dword:00000003
CMD
:: Opties (gebruik er maar één) :: Uitgeschakeld reg add "HKLM\Software\Policies\Microsoft\Windows\Sudo" /v "Enabled" /t REG_DWORD /d 0 /f :: Nieuw venster forceren reg add "HKLM\Software\Policies\Microsoft\Windows\Sudo" /v "Enabled" /t REG_DWORD /d 1 /f :: Invoer uitschakelen reg add "HKLM\Software\Policies\Microsoft\Windows\Sudo" /v "Enabled" /t REG_DWORD /d 2 /f :: Normaal reg add "HKLM\Software\Policies\Microsoft\Windows\Sudo" /v "Enabled" /t REG_DWORD /d 3 /f
PowerShell
# Algemeen: sleutel maken New-Item -Path 'HKLM:\Software\Policies\Microsoft\Windows\Sudo' -Force | Out-Null # Opties (gebruik er maar één) # Uitgeschakeld New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\Sudo' -Name 'Enabled' -PropertyType DWord -Value 0 -Force | Out-Null # Nieuw venster forceren New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\Sudo' -Name 'Enabled' -PropertyType DWord -Value 1 -Force | Out-Null # Invoer uitschakelen New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\Sudo' -Name 'Enabled' -PropertyType DWord -Value 2 -Force | Out-Null # Normaal New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows\Sudo' -Name 'Enabled' -PropertyType DWord -Value 3 -Force | Out-Null