Created
October 20, 2020 21:44
-
-
Save JaekelEDV/6090968bdd54313a3c1aea92d887a239 to your computer and use it in GitHub Desktop.
Test-LLMNR
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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