How to Enable DNS Query Logs in Windows DNS Server
From Notes_Wiki
Home > Windows > DNS > How to Enable DNS Query Logs in Windows DNS Server
How to Enable DNS Query Logs in Windows DNS Server
β Enable DNS Analytical Logging in Event Viewer
- Press Win + R, type eventvwr, and press Enter.
- In Event Viewer, go to View > Show Analytic and Debug Logs (makes Analytical logs visible).
- Navigate to:
Applications and Services Logs β
Microsoft β
Windows β
DNS-Server β
Analytical
- Right-click Analytical β Properties β Check Enable Logging β Click OK.
β Enable DNS Debug Logging via DNS Manager
- Press Win + R, type dnsmgmt.msc, and press Enter.
- Right-click your DNS server (e.g., SERVER-NAME) β Properties β Debug Logging tab.
- Enable Log packets for debugging and select:
β Queries
β Updates
β Notifications
β Other DNS messages
- Click Apply β OK.
π Log File Location
- Analytical logs (ETL format):
C:\Windows\System32\winevt\Logs\Microsoft-Windows-DNS-Server%4Analytical.etl
π Convert .etl to .csv via PowerShell
- Navigate to the log directory in PowerShell.
- Run:
tracerpt "Microsoft-Windows-DNS-Server%4Analytical.etl" -o DNS_Logs.csv -of CSV
β οΈ Important Notes
- Debug logs consume significant disk spaceβmonitor regularly.
- Analytical logs require no DNS zone configuration.
- For long-term logging, schedule log rotation/archiving.
Home > Windows > DNS > How to Enable DNS Query Logs in Windows DNS Server