Information Technology Reference
In-Depth Information
LMHOSTSFile = "\\server1\admin\lmhosts"
ScopeID = "FINANCE" ' set this to the name of your NetBIOS
' scope
' ------ END CONFIGURATION ---------
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set nicConfig = objWMIService.Get("Win32_NetworkAdapterConfiguration")
EnableWINS = nicConfig.EnableWINS(EnableDNS, EnableLMHosts, _
LMHOSTSFile, ScopeID)
If EnableWINS = 0 Then
WScript.Echo "Set WINS options successfully!"
ElseIf intEnableWINS = 1 Then
WScript.Echo "Set WINS options successfully! Please reboot."
Else
WScript.Echo "Error! Unable to set WINS options."
End If
How It Works
Even though WINS and NetBIOS name resolution is waning in popularity, there are still a
number of advanced options that you can configure to customize the behavior of NetBIOS on
your Windows Server 2003 computers. The advanced options that you can configure include
the following:
￿
Enabling DNS as a backup for WINS name resolution: If you enter a NetBIOS name
(such as \\COMPUTER1 ) that cannot be resolved from WINS servers or a NetBIOS broadcast,
this setting will instruct your computer to use DNS as a last-resort attempt to resolve the
NetBIOS name.
￿
Enabling lookups from an Lmhosts file: Before WINS was developed, administrators
would maintain a text file on the local hard drive that contained NetBIOS name mappings.
This file, called Lmhosts, can still be used as part of the NetBIOS name resolution
process; in this way, you can prepopulate the Lmhosts file with NetBIOS name mappings
such as domain controllers or other critical servers whose IP addresses don't change
very often. By default, the Lmhosts file resides in the %systemroot%\system32\drivers\
etc directory, but you can configure your computer to look up entries from an Lmhosts
file in another location. You can use this capability to point your client computers to an
Lmhosts file located on a centralized file server that can be easily kept up to date.
Configuring one or more NetBIOS scope IDs: Scope IDs are text strings such as FINANCE
or WORKGROUP . If you configure a computer with a specific scope ID, that computer will
only be able to communicate with other computers that have the same scope ID. This
was used extensively in earlier versions of Windows to restrict NetBIOS traffic to particular
groups of computers that needed to communicate only with each other.
￿
Search WWH ::




Custom Search