Enabling NetBIOS vias powershell script

Welcome Forums General PowerShell Q&A Enabling NetBIOS vias powershell script

  • This topic has 1 reply, 2 voices, and was last updated 7 months ago by
Viewing 1 reply thread
  • Author
    • #195836
      Topics: 1
      Replies: 0
      Points: -8
      Rank: Member

      I want to write a script that enables NetBIOS on an adapter. SO I can run this as a schedule task once a month. I have searched te articles and forums and have found how to get properties of the adapter, but not how to set the NetBIOS property to enabled. I am very new to powershell so this is indeed a newbie question.

    • #195857
      Topics: 4
      Replies: 234
      Points: 1,276
      Helping Hand
      Rank: Community Hero


      As far as I know, there is no direct CmdLet to enable or disable the ‘NetBIOS over TCP/IP’ on a NIC, so you can use CIM classes/methods to achieve the same…

      # List the available network adapters,
      # and get the interface index of a nic to which you want enable the NetBIOS
      # Get the adapter using CIM instance
      $Adapter = Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Filter “InterfaceIndex = 14”
      # Invoke the method to enable the NetBIOS on the same adapter
      # Default = 0, Enable = 1, Disable = 2
      Invoke-CimMethod -InputObject $Adapter -MethodName SetTcpipNetbios -Arguments @{TcpipNetbiosOptions = 1}

      Since you mentioned that you are a newbie, please do some basic PowerShell trainings to get familiar with various CmdLets and techniques before you actually jump in writing the scripts.

      Thank you.

Viewing 1 reply thread
  • The topic ‘Enabling NetBIOS vias powershell script’ is closed to new replies.