开发者

Disable NetBios over TCP/IP & also get Location id for a NIC using powershell

开发者 https://www.devze.com 2023-03-16 06:50 出处:网络
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

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 ?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号