Skip to content

Instantly share code, notes, and snippets.

@JaekelEDV
Created October 20, 2020 21:44
Show Gist options
  • Save JaekelEDV/6090968bdd54313a3c1aea92d887a239 to your computer and use it in GitHub Desktop.
Save JaekelEDV/6090968bdd54313a3c1aea92d887a239 to your computer and use it in GitHub Desktop.
Test-LLMNR
#Check if LLMNR will be used.
$RegPath = "HKLM:\Software\Policies\Microsoft\Windows NT\DNSClient"
$RegKey = Get-ItemProperty -Path $RegPath | Select-Object -Property 'EnableMulticast'
$RegValue = $RegKey.EnableMulticast
$RegCheck = Test-Path $RegPath
if ($RegCheck -eq $true) {
Write-Host "[+]The settings of $RegPath are $RegKey" -ForegroundColor Yellow
}
if ($RegCheck -eq $false) {
Write-Host "-> LLMNR is active." -ForegroundColor Red
}
if ($RegValue -eq '1'){
Write-Host "-> LLMNR is active." -ForegroundColor Red
}
if ($RegValue -eq '0'){
Write-Host "-> LLMNR is inactive." -ForegroundColor Green
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment