Solved

Change TCP/IP settings with batch file (turn on NetBIOS over TCP/IP) *******URGENT**********

Posted on 2004-10-07
4
1,328 Views
Last Modified: 2012-08-14
I need a way to turn on NetBIOS over TCP IP for a bunch of XP boxes and I need it as soon as possible!  
Prefer batch script--the simpler the better!
0
Comment
Question by:zamoti
  • 3
4 Comments
 
LVL 27

Expert Comment

by:Asta Cu
ID: 12254282
0
 
LVL 27

Accepted Solution

by:
Asta Cu earned 500 total points
ID: 12254299
Or this?
Automating TCP/IP Networking on Clients
Part 6: Scripting WINS on Clients
http://www.microsoft.com/technet/scriptcenter/topics/networking/06_atnc_wins.mspx
Asta
0
 
LVL 3

Author Comment

by:zamoti
ID: 12254588
Hell yes!

You got any ideas on how to edit this thing to run without the popup "ok" boxes?  I know nothing about vbs and am currently too desperate to figure it out.  I'll take it as is, but no popups would be best.

On Error Resume Next
 
Const ENABLE_NETBIOS_VIA_DHCP = 0
Const ENABLE_NETBIOS = 1
Const DISABLE_NETBIOS = 2
strComputer = "."
 
Set objWMIService = GetObject("winmgmts:" _
 & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colNicConfigs = objWMIService.ExecQuery _
 ("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = True")
 
WScript.Echo VbCrLf & "Host Name: " & strComputer
For Each objNicConfig in colNicConfigs
  WScript.Echo VbCrLf & "  Network Adapter " & objNicConfig.Index & _
   "    " & objNicConfig.Description & VbCrLf & _
  "    Attempting to set NetBIOS over TCP/IP default."
  intNetBIOS = objNicConfig.SetTCPIPNetBIOS(ENABLE_NETBIOS_VIA_DHCP)
  If intNetBIOS = 0 Then
    WScript.Echo "    Successfully set NetBIOS over TCP/IP default."
  ElseIf intNetBIOS = 1 Then
    WScript.Echo "    Successfully set NetBIOS over TCP/IP default." & _
     VbCrLf & "    Must reboot."
  Else
    WScript.Echo "    Unable to set NetBIOS default."
  End If
Next
 
WScript.Echo VbCrLf & String(80, "-")
 
Set colNicConfigs = objWMIService.ExecQuery _
 ("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = True")
 
For Each objNicConfig In colNicConfigs
  WScript.Echo VbCrLf & _
   "  Network Adapter " & objNicConfig.Index & VbCrLf & _
   "    " & objNicConfig.Description
  intNetBIOS = objNicConfig.TcpipNetbiosOptions
  Select Case intNetBIOS
    Case 0 strNetBIOS = "Use NetBIOS setting from the DHCP server"
    Case 1 strNetBIOS = "Enable NetBIOS over TCP/IP"
    Case 2 strNetBIOS = "Disable NetBIOS over TCP/IP"
  End Select
  WScript.Echo "    NetBIOS Over TCP/IP: " & strNetBIOS
Next
0
 
LVL 27

Expert Comment

by:Asta Cu
ID: 12254617
Yipee!  Happy I could help.

Sorry to be "out of it", do you need more?

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article we will discuss all things related to StageFright bug, the most vulnerable bug of android devices.
Windows 10 is here and for most admins this means frustration and challenges getting that first working Windows 10 image. As in my previous sysprep articles, I've put together a simple help guide to get you through this process. The aim is to achiev…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now