I wanted someone to hel开发者_Python百科p me out to disable NetBIOS over TCP/IP and also to get the location ID of a NIC using PowerShell,
First thing : Here is a way to disable Netbios over TCP/IP
# My network card name
$networkCardName = "Connexion au réseau local"
$adapter=(gwmi -query "select * from win32_networkadapter where netconnectionid= 'Connexion au réseau local'").deviceid
([wmi]"\\.\root\cimv2:Win32_NetworkAdapterConfiguration.Index=$adapter").SetTcpipNetbios(2)
With different values available for 'SetTcpipNetbios
' :
0 (0x0) Enable Netbios via DHCP
1 (0x1) Enable Netbios
2 (0x2) Disable Netbios
Second thing : The location ID for a NIC what do you mean ?
精彩评论