Share via


Enable TCP/IP NetBIOS via CMD

Question

Thursday, April 23, 2015 1:21 PM

Hello colleagues

How enable NetBIOS in Windows 7 and XP on all network adapters via CMD? I khow about disable it:

wmic nicconfig where (TcpipNetbiosOptions!=Null and TcpipNetbiosOptions!=2) call SetTcpipNetbios 2

but I can't enable via CMD, ...call SetTcpipNetbios 0 - doesn't work (NetBIOS not changed in TCP/IP of network adapter)

All replies (4)

Friday, April 24, 2015 5:37 AM ✅Answered | 1 vote

Hi,

Use the commend line below to get a list of interfaces:
wmic nicconfig get caption,index,TcpipNetbiosOptions

Remember of the number of the interface which you want to change. use the commend below to change the setting of NetBIOS:
wmic nicconfig where index= [index number] call SetTcpipNetbios [state option]

state options:
0 – Use NetBIOS setting from the DHCP server
1 – Enable NetBIOS over TCP/IP
2 – Disable NetBIOS over TCP/IP

Best Regards,
Eve Wang

Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected].


Wednesday, May 13, 2015 6:04 AM ✅Answered

Hi,

Or, you may configure settings of NetBIOS over TCP/IP by using DHCP server options(0x1 as enable). Reference link:
https://support.microsoft.com/en-us/kb/313314/

But this is only work for DHCP enabled client, and each client also need to be set with related option.

Best Regards,
Eve Wang 

Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected].


Thursday, April 30, 2015 11:24 AM

Hi,

Use the commend line below to get a list of interfaces:
wmic nicconfig get caption,index,TcpipNetbiosOptions

Remember of the number of the interface which you want to change. use the commend below to change the setting of NetBIOS:
wmic nicconfig where index= [index number] call SetTcpipNetbios [state option]

state options:
0 – Use NetBIOS setting from the DHCP server
1 – Enable NetBIOS over TCP/IP
2 – Disable NetBIOS over TCP/IP

Best Regards,
Eve Wang

Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected].

ok, I can't use it via Group Policy because I don't know about index numbers on every PC in domain. Sure I can write 40 lines with 0-39 index numbers in the script but maybe passibly another way.


Tuesday, July 12, 2016 10:38 PM | 1 vote

Hi!

I know this is an old thread but just in case anyone else needs it, here are a couple of one-liners to do what you want. The first one will set all NICs to disable NetBIOS over TCP/IP, even if they're set to use DHCP settings:

wmic nicconfig where (TcpipNetBiosOptions!=Null and TcpipNetBiosOptions!=2) call SetTcpipNetbios 2

This one only changes those NICs that have NBT explicitly enabled and disable it:

wmic nicconfig where TcpipNetBiosOptions=1 call SetTcpipNetbios 2

Hope that helps someone.

Cheers,

Fred