Powershell – How to disable NetBios

Disable Netbios

If you want to use Powershell to disable Netbios on several computers, you can execute this script:

$adapters=(gwmi win32_networkadapterconfiguration )
Foreach ($adapter in $adapters){
  Write-Host $adapter


Parameters for settcpipnetbios are:

  • 0: Enable Netbios via DHCP.
  • 1: Enable Netbios on the interface.
  • 2: Disable Netbios on the interface.

For more information on this function:


After the script was runned, you will have this configuration:
Disable netbios


3 thoughts on “Powershell – How to disable NetBios

  1. Sadly, it only changes the setting for adapters that are currently connected. So if, say, you’re on a cabled connection, the setting won’t be changed for the WiFi adapter, and vice versa.

  2. this helped me out a lot today, i needed something simple and this was great. now i have to figure out how to point it to my text file so i can push it to multiple workstations. Thanks

Leave a Reply

Your email address will not be published. Required fields are marked *