Intune Initial Scripts Backup
This commit is contained in:
18
intune/Proactive Remediations/Disable LLMNR/Detect_LLMNR.ps1
Normal file
18
intune/Proactive Remediations/Disable LLMNR/Detect_LLMNR.ps1
Normal file
@@ -0,0 +1,18 @@
|
||||
$Path = "HKLM:\Software\policies\Microsoft\Windows NT\DNSClient"
|
||||
$Name = "EnableMulticast"
|
||||
$Type = "DWORD"
|
||||
$Value = 0
|
||||
|
||||
Try {
|
||||
$Registry = Get-ItemProperty -Path $Path -Name $Name -ErrorAction Stop | Select-Object -ExpandProperty $Name
|
||||
If ($Registry -eq $Value){
|
||||
Write-Output "Compliant"
|
||||
Exit 0
|
||||
}
|
||||
Write-Warning "Not Compliant"
|
||||
Exit 1
|
||||
}
|
||||
Catch {
|
||||
Write-Warning "Not Compliant"
|
||||
Exit 1
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
$Path1 ="HKLM:\Software\policies\Microsoft\Windows NT"
|
||||
$Path = "HKLM:\Software\policies\Microsoft\Windows NT\DNSClient"
|
||||
$Name = "EnableMulticast"
|
||||
$Type = "DWORD"
|
||||
$Value = 0
|
||||
|
||||
|
||||
$DNSclient = (Get-ItemProperty $path1).psobject.properties.name -contains "dnsclient"
|
||||
|
||||
If ($DNSclient -eq $false)
|
||||
{
|
||||
New-Item -Path $Path
|
||||
}
|
||||
|
||||
Set-ItemProperty -Path $Path -Name $Name -Type $Type -Value $Value
|
||||
Reference in New Issue
Block a user