Windows Defender Firewall: Allow logging: registry value LogDroppedPackets and 3 more (StandardProfile\Logging)ComputerHKLM\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\Logging
- Policy ID
- WF_Logging_Name_2
- Scope
- Computer Configuration
- Supported on
- At least Windows XP Professional with SP2
- Source
- Administrative Templates (.admx) for Windows 11 2026 Update (26H2) (version 1.0)
- Category
- Network › Network Connections › Windows Defender Firewall › Standard Profile
Registry
LogDroppedPackets
REG_SZComputer- Disabled value
- 0
Apply with .reg · CMD · PowerShell
Disabled
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\Logging] "LogDroppedPackets"="0"
CMD · Disabled
reg add "HKLM\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\Logging" /v "LogDroppedPackets" /t REG_SZ /d 0 /f
PowerShell · Disabled
New-Item -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\Logging' -Force | Out-Null New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\Logging' -Name 'LogDroppedPackets' -PropertyType String -Value '0' -Force | Out-Null
LogSuccessfulConnections
REG_SZComputer- Disabled value
- 0
Apply with .reg · CMD · PowerShell
Disabled
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\Logging] "LogSuccessfulConnections"="0"
CMD · Disabled
reg add "HKLM\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\Logging" /v "LogSuccessfulConnections" /t REG_SZ /d 0 /f
PowerShell · Disabled
New-Item -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\Logging' -Force | Out-Null New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\Logging' -Name 'LogSuccessfulConnections' -PropertyType String -Value '0' -Force | Out-Null
LogDroppedPackets
REG_DWORDComputer- Checked
- 1
- Unchecked
- 0
- Element
- Log dropped packets
- Value type
- REG_DWORD
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\Logging] ; Options (use only one) ; Checked "LogDroppedPackets"=dword:00000001 ; Unchecked "LogDroppedPackets"=dword:00000000
CMD
:: Options (use only one) :: Checked reg add "HKLM\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\Logging" /v "LogDroppedPackets" /t REG_DWORD /d 1 /f :: Unchecked reg add "HKLM\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\Logging" /v "LogDroppedPackets" /t REG_DWORD /d 0 /f
PowerShell
# Common: create the key New-Item -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\Logging' -Force | Out-Null # Options (use only one) # Checked New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\Logging' -Name 'LogDroppedPackets' -PropertyType DWord -Value 1 -Force | Out-Null # Unchecked New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\Logging' -Name 'LogDroppedPackets' -PropertyType DWord -Value 0 -Force | Out-Null
LogSuccessfulConnections
REG_DWORDComputer- Checked
- 1
- Unchecked
- 0
- Element
- Log successful connections
- Value type
- REG_DWORD
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\Logging] ; Options (use only one) ; Checked "LogSuccessfulConnections"=dword:00000001 ; Unchecked "LogSuccessfulConnections"=dword:00000000
CMD
:: Options (use only one) :: Checked reg add "HKLM\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\Logging" /v "LogSuccessfulConnections" /t REG_DWORD /d 1 /f :: Unchecked reg add "HKLM\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\Logging" /v "LogSuccessfulConnections" /t REG_DWORD /d 0 /f
PowerShell
# Common: create the key New-Item -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\Logging' -Force | Out-Null # Options (use only one) # Checked New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\Logging' -Name 'LogSuccessfulConnections' -PropertyType DWord -Value 1 -Force | Out-Null # Unchecked New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\Logging' -Name 'LogSuccessfulConnections' -PropertyType DWord -Value 0 -Force | Out-Null
LogFilePath
REG_SZComputer- Enabled value
- Depends on the option value
- Element
- Log file path and name:
- Value type
- REG_SZ
- Required
- true
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\Logging] ; Value names and types follow the ADMX. Replace <enter value> below with your own data "LogFilePath"="<enter value>"
CMD
:: Value names and types follow the ADMX. Replace <enter value> below with your own data reg add "HKLM\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\Logging" /v "LogFilePath" /t REG_SZ /d "<enter value>" /f
PowerShell
# Value names and types follow the ADMX. Replace <enter value> below with your own data New-Item -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\Logging' -Force | Out-Null New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\Logging' -Name 'LogFilePath' -PropertyType String -Value '<enter value>' -Force | Out-Null
LogFileSize
REG_DWORDComputer- Enabled value
- Depends on the option value
- Element
- Size limit (KB):
- Value type
- REG_DWORD
- Required
- true
- Minimum value
- 128
- Maximum value
- 32767
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\Logging] ; Value names and types follow the ADMX. Replace <enter value> below with your own data "LogFileSize"=dword:<enter value>
CMD
:: Value names and types follow the ADMX. Replace <enter value> below with your own data reg add "HKLM\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\Logging" /v "LogFileSize" /t REG_DWORD /d "<enter value>" /f
PowerShell
# Value names and types follow the ADMX. Replace <enter value> below with your own data New-Item -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\Logging' -Force | Out-Null New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\Logging' -Name 'LogFileSize' -PropertyType DWord -Value '<enter value>' -Force | Out-Null