1. Manual Procedure
Go to
- Control Panel
- Network and Sharing Center
.
Click “Change adapter settings“
.
Right-Click a Network Interface Card
Properties
.
Select “Internet Protocol Version 4 (TCP/IPv4)”
Properties
.
Click “Advanced…“
.
Select “Disable NetBIOS over TCP/IP“
.
.
2. Script
Here is a script allowing to disable NetBIOS over TCP/IP for all Network Interface Cards.
Option Explicit
On Error Resume Next
'Declarations
'---------------------------------------------------------------------------------------------------------------------------------
Const HKEY_LOCAL_MACHINE = &H80000002
Set strComputer = "."
Set ObjWMI = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")
Set strKeyPath = "SYSTEM\CurrentControlSet\services\NetBT\Parameters\Interfaces"
'Actions
'---------------------------------------------------------------------------------------------------------------------------------
'Get all interfaces
ObjWMI.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys
'Exit if error in getting strKeyPath
If IsNull(arrSubKeys) Then WScript.Quit
'Disable NetBIOS over TCP/IP for all Network Interface Cards
For Each Adapter In arrSubKeys
Msgbox("Disabling NetBIOS over TCP/IP on " & Adapter)
objWMI.SetDWORDValue HKEY_LOCAL_MACHINE, strKeyPath & "\" & Adapter, "NetbiosOptions", 2
Next
Msgbox("Completed")





