Skip to content

Instantly share code, notes, and snippets.

Daniel Streefkerk dstreefkerk

Block or report user

Report or block dstreefkerk

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@dstreefkerk
dstreefkerk / dns_client_log.ps1
Created Mar 21, 2019 — forked from randomvariable/dns_client_log.ps1
DNS Client Logging on Windows
View dns_client_log.ps1
function Start-DNSClientLog {
$DnsOpLog = Get-WinEvent -ListLog Microsoft-Windows-DNS-Client/Operational
$DnsOpLog.IsEnabled = $true
$DnsOpLog.SaveChanges()
}
function Get-DNSClientQueries {
foreach($event in (get-winevent Microsoft-Windows-DNS-Client/Operational | % { [xml]$_.ToXml() })) {
$Query = ($event.Event.EventData.Data | Where-Object { $_.Name -eq "QueryName" }).'#text'
You can’t perform that action at this time.