Modify NIC's TCP/IP NetBIOS Setting RRS feed

  • Question

  • Following checks all NIC whether IPEnabled is True or False.  It changes the NIC with IPEnabled to NetBIOS Enabled (default value 0), or Disabled (Value 2).

    First issue, for the Enabled (0), it works on WIndows 10 but does nothing on Windows 2012 R2 with elevated domain admin credential.... (works on Vmxnet3, does not work on hyper-v nic or microsoft cluster nic)

    Second, how do I mass deploy when there are uac restrictions?  remote invoke-command doesn't seem to work.


    $adapters=(gwmi win32_networkadapterconfiguration )

    # Value 0 = Enabled     Value 2 = Disabled
    $switch = 0

    Foreach ($adapter in $adapters){

        If ($adapter.IPEnabled -eq $True) {

            $adapter.settcpipnetbios($switch) > null
            } ELSE 
            {Write-Host "no changes"}

    #Check Value again

    $adapters=(gwmi win32_networkadapterconfiguration )

    Foreach ($adapter in $adapters) {

        If ($adapter.IPEnabled -eq $True) {
            Write-host "INDEX: " $adapter.index " IPEnabled: "$adapter.ipenabled " NETBIOS: " $adapter.tcpipnetbiosoptions "DESC: "$adapter.description -ForegroundColor Green
            } Else {
            Write-host "INDEX: " $adapter.index " IPEnabled: "$adapter.ipenabled " NETBIOS: " $adapter.tcpipnetbiosoptions "DESC: "$adapter.description -ForegroundColor White

    • Edited by JT_CP Tuesday, March 7, 2017 9:53 PM
    • Moved by Bill_Stewart Friday, April 28, 2017 6:19 PM This is not "troubleshoot my environment-specific deployment problem from afar" forum
    Tuesday, March 7, 2017 9:42 PM


  • Invoke-Command does not require elevation.  You cannot use Invoke-Command to eth local machine.  It won't work for most things.

    If DHCP or Group Policy have disabled NetBIOS over TCPIP then you cannot change it.

    Teamed NICS are managed by the team.

    Get-WmiObject Win32_NetworkAdapter -Filter 'IPEnabled = True' | Select Caption, TcpipNetbiosOptions
      Get-WmiObject Win32_NetworkAdapter -Filter 'IPEnabled = True'  |
       ForEach-Object{ $_.SetTcpipNetbios(1)}

    This works on all current versions of Windows with the exceptions noted above.  It also works on VMs.

    Configuring an active adapter that you are connected through may cause issues.


    • Marked as answer by JT_CP Thursday, April 12, 2018 3:45 PM
    Tuesday, March 7, 2017 11:20 PM