Information Technology Reference
In-Depth Information
Using the Registry
The majority of the Registry settings that control TCP/IP configuration are found in the
following subkey:
[HKEY_LOCAL_MACHINE\SYSTEM\Current Control Set\Services\Tcpip\Parameters\]
When configuring a setting that is specific to a particular network interface card (NIC)
installed in a server, you'll use the subkey that corresponds to the globally unique identifier
(GUID) of the interface. It might look something like this:
HKEY_LOCAL_MACHINE\SYSTEM\Current Control Set\
Services\Tcpip\Parameters\Interfaces\
{01B3816C-AB47-3E53-CB7C-88345293465}
To find the GUID that corresponds to a particular IP address in your computer, use the
WMI command-line tool (wmic) with the following syntax:
> wmic nicconfig get ipaddress,settingid
Using VBScript
Basic TCP/IP information is exposed through WMI through the
Win32_NetworkAdapterConfiguration WMI class. This class exposes a number of variables and
methods that you can use to configure TCP/IP on a local or remote computer. These are some
of the methods that you'll see used in the recipes in this chapter:
￿ EnableDHCP()
￿ EnableWINS()
￿ SetDNSDomain()
￿ SetDNSServerSearchOrder()
￿ SetDNSServerSuffixOrder()
1-1. Configuring the Computer Host Name
Problem
You want to change the name of your Windows Server 2003 computer.
Solution
Using a Graphical User Interface
1.
Right-click on My Computer and select Properties.
2.
From the Computer Name tab, select Change.
Search WWH ::




Custom Search