API Reference
Command
Get-ADXDnsLogFile
Retrieves DNS log entries from a specified file.
Examples
Example 1
Get-ADXDnsLogFile -Path "C:\Logs\dns.log" -Summary
Get a basic summary of a DNS log file:
Example 2
Get-ADXDnsLogFile -Path "C:\Logs\dns.log" -Protocol UDP -QuestionType A
Get DNS entries filtered by protocol and type:
Example 3
Get-ADXDnsLogFile -Path "C:\Logs\dns.log" -SummaryPerZone -LocalZones "contoso.com","internal.net"
Get a summary of queries per zone with local zone definitions:
Example 4
Get-ADXDnsLogFile -Path "C:\Logs\dns.log" -SummaryPerIp -MaxRawQueries 50
Limit stored raw queries when summarizing per IP:
Example 5
Get-ADXDnsLogFile -Path "C:\Logs\dns.log" -ResponseCode NXDOMAIN -ExcludeResponseCode SERVFAIL
Filter entries by response codes:
Example 6
Get-ADXDnsLogFile -Path "C:\Logs\dns.log" -SummaryPerInterval ([TimeSpan]'00:01:00')
Get per-minute query counts:
Common Parameters
This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters.
Syntax
Get-ADXDnsLogFile -Path <string[]> [-NoAsync] [-Cache] [-CacheDirectory <string>] [-ComputerName <string[]>] [-Deduplicate] [-Direction <Unknown|Send|Receive>] [-DoNotMerge] [-ExactMatchIP] [-ExactQuestionNameMatch] [-ExactZoneNameMatch] [-ExcludeQuestionType <string[]>] [-ExcludeResponseCode <string[]>] [-ExcludeZoneName <string[]>] [-IncludeAllMatchedZones] [-MatchedZones <string[]>] [-MaxRawQueries <int>] [-NoProgress] [-OutputFormat <HashTable|Array|Combined>] [-Parallel] [-Protocol <Unknown|UDP|TCP>] [-QuestionName <string[]>] [-QuestionType <string[]>] [-RemoteIP <string[]>] [-ResponseCode <string[]>] [-StrictZoneMatching] [-Subnet <int>] [-Summary] [-SummaryPerInterval <TimeSpan>] [-SummaryPerIp] [-SummaryPerZone] [-TestProgressAction <ScriptBlock>] [-ZoneSelection <Both|ExternalZones|MatchedZones>] [<CommonParameters>]#Parameters
- Path string[]
- Path to DNS log files.
- NoAsync SwitchParameter
- Disable asynchronous processing.
- Cache SwitchParameter
- Cache processed log files.
- CacheDirectory string
- Directory used to store cached files.
- ComputerName string[]
- Remote computers to retrieve log files from.
- Deduplicate SwitchParameter
- Deduplicate identical entries across files when merging.
- Direction DnsDirection[]
- Filter results by query direction. Possible values: Unknown, Send, Receive, None
- Possible values:
Unknown,Send,Receive - DoNotMerge SwitchParameter
- Do not merge related DNS records.
- ExactMatchIP SwitchParameter
- Require exact IP address matches.
- ExactQuestionNameMatch SwitchParameter
- Require an exact match for question names.
- ExactZoneNameMatch SwitchParameter
- Require an exact zone name match.
- ExcludeQuestionType string[]
- Exclude specified question types.
- ExcludeResponseCode string[]
- Exclude specified response codes.
- ExcludeZoneName string[]
- Exclude specified zone names.
- IncludeAllMatchedZones SwitchParameter
- Include all matched zones in summaries.
- MatchedZones string[]
- Zone names to match in log entries.
- MaxRawQueries int
- Maximum number of raw queries to output.
- NoProgress SwitchParameter
- Suppress progress output.
- OutputFormat DnsSummaryOutputFormat
- Format of summary output. Possible values: HashTable, Array, Combined
- Possible values:
HashTable,Array,Combined - Parallel SwitchParameter
- Enable parallel processing.
- Protocol DnsProtocol[]
- Filter results by DNS protocol. Possible values: Unknown, UDP, TCP, None
- Possible values:
Unknown,UDP,TCP - QuestionName string[]
- Filter by DNS question names.
- QuestionType string[]
- Filter by DNS question types.
- RemoteIP string[]
- Filter results by remote IP addresses.
- ResponseCode string[]
- Filter results by response codes.
- StrictZoneMatching SwitchParameter
- Enforce strict zone matching rules.
- Subnet int
- Subnet size used when grouping IP addresses.
- Summary SwitchParameter
- Output summary statistics.
- SummaryPerInterval TimeSpan
- Interval used for per-interval summary.
- SummaryPerIp SwitchParameter
- Summarize results per IP address.
- SummaryPerZone SwitchParameter
- Summarize results per zone.
- TestProgressAction ScriptBlock
- Script block used to test progress reporting.
- ZoneSelection DnsSummaryZoneSelection
- Specify which zones to include in results. Possible values: Both, ExternalZones, MatchedZones
- Possible values:
Both,ExternalZones,MatchedZones