Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Disable NetBios Over Ip : tcp/139, udp/137, udp/138
- $Path='HKLM:\SYSTEM\CurrentControlSet\Services\NetBT\Parameters\Interfaces'
- Get-ChildItem -Path $Path|Select Name|ForEach{
- $Key=$_.Name.Replace("HKEY_LOCAL_MACHINE\","HKLM:")
- Set-Itemproperty -Path $Key -Name "NetbiosOptions" -value 0
- }
- #Disable LLMNR : udp/5355
- $Path='HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\DNSClient'
- $Value = Get-ItemProperty -Path $Path -Name 'EnableMulticast' -ErrorAction SilentlyContinue
- If($Value -eq $null)
- {
- New-ItemProperty -path $Path -name 'EnableMulticast' -value 0 -PropertyType Dword
- }
- Else
- {
- Set-Itemproperty -Path $Path -Name "EnableMulticast" -value 0
- }
- #Disable IPv6
- $Path='HKLM:\SYSTEM\CurrentControlSet\services\TCPIP6\Parameters'
- $Value = Get-ItemProperty -Path $Path -Name 'DisabledComponents' -ErrorAction SilentlyContinue
- If($Value -eq $null)
- {
- New-ItemProperty -path $path -name 'DisabledComponents' -value 4294967295 -PropertyType Dword
- }
- Else
- {
- Set-Itemproperty -Path $Path -Name "DisabledComponents" -value 4294967295
- }
- #Disable SSDP : udp/1900
- $Path='HKLM:\SYSTEM\CurrentControlSet\services\SSDPSRV'
- Set-Itemproperty -Path $Path -Name "Start" -value 4
- #Disable UPnP : tcp/5000
- $Path='HKLM:\SYSTEM\CurrentControlSet\services\upnphost'
- Set-Itemproperty -Path $Path -Name "Start"-value 4
- #Disable Discovery Provider Host
- $Path='HKLM:\SYSTEM\CurrentControlSet\services\fdPHost'
- Set-Itemproperty -Path $Path -Name "Start" -value 4
- #Disable IPSec : Udp/500
- $Path='HKLM:\SYSTEM\CurrentControlSet\services\PolicyAgent'
- Set-Itemproperty -Path $Path -Name "Start" -value 4
- $Path='HKLM:\SYSTEM\CurrentControlSet\services\IKEEXT'
- Set-Itemproperty -Path $Path -Name "Start" -value 4
- #Disable AutoProxy
- $Path='HKLM:\SYSTEM\CurrentControlSet\services\WinHttpAutoProxySvc'
- Set-Itemproperty -Path $Path -Name "Start" -value 4
Add Comment
Please, Sign In to add comment