I'm looking for a way to enable NetBios on all servers in my domain for a limited time of about a month and later i am supposed to disable it again (it is used by some inventory application we are using). Do you have any idea how to achieve this goal? Powershell script would be nice.
The following script will do what you want via PowerShell. You will need a text file with the name of each server on a line. The script assumes that there is one active NIC on each system. If you have multiple active NICs, you would need to loop through them, setting on each.
If you have all of your servers in one OU, you could use the QuestAD cmdlets to pull all of them into the $computers variable, then pass the name that way.
Create a separate text file that contains a CSV list or a carriage-return-delimited list of computer names called
Then run the following commands from an appropriate permissioned account:
When you are done change the above code to SetTcpipNetbios to 2 (disabled). (0 is set via DHCP)