Wybierz domyślne zasady wymuszania kontroli urządzeń: wartość rejestru DefaultEnforcementKomputerHKLM\Software\Policies\Microsoft\Windows Defender\Device Control
- Identyfikator zasady
- DeviceControl_DefaultEnforcement
- Zakres
- Konfiguracja komputera
- Obsługiwane w systemach
- Co najmniej Windows Server 2016 lub Windows 10 w wersji 1607
- Źródło
- Administrative Templates (.admx) for Windows 11 2026 Update (26H2) (wersja 1.0)
- Kategoria
- Składniki systemu Windows › Program antywirusowy Microsoft Defender › Sterowanie urządzeniami
Rejestr
DefaultEnforcement
REG_DWORDKomputer- Wartość włączona
- Zależy od wartości opcji
- Element
- Wybierz domyślne zasady wymuszania kontroli urządzeń
| Pozycja | Zapisana wartość |
|---|---|
| Zezwalaj domyślnie | 1 |
| Odmów domyślnie | 2 |
Zastosuj przez .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender\Device Control] ; Opcje (użyj tylko jednej) ; Zezwalaj domyślnie "DefaultEnforcement"=dword:00000001 ; Odmów domyślnie "DefaultEnforcement"=dword:00000002
CMD
:: Opcje (użyj tylko jednej) :: Zezwalaj domyślnie reg add "HKLM\Software\Policies\Microsoft\Windows Defender\Device Control" /v "DefaultEnforcement" /t REG_DWORD /d 1 /f :: Odmów domyślnie reg add "HKLM\Software\Policies\Microsoft\Windows Defender\Device Control" /v "DefaultEnforcement" /t REG_DWORD /d 2 /f
PowerShell
# Wspólne: utwórz klucz New-Item -Path 'HKLM:\Software\Policies\Microsoft\Windows Defender\Device Control' -Force | Out-Null # Opcje (użyj tylko jednej) # Zezwalaj domyślnie New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows Defender\Device Control' -Name 'DefaultEnforcement' -PropertyType DWord -Value 1 -Force | Out-Null # Odmów domyślnie New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows Defender\Device Control' -Name 'DefaultEnforcement' -PropertyType DWord -Value 2 -Force | Out-Null