Windows 7 / Getting Started

Setting Static TCP/IP v4 Information

By default, the new installation has been dynamically allocated an IP address. However, in most cases a server needs static IPv4 information, which can be seen with the ipconfig /all command. It will show DHCP Enabled set to Yes.

Because you can't use the normal Network interface to set the IP properties, instead use the netsh command. However, before you can set the IP properties, check which interface you are configuring. By default your server has two network interfaces: the "real physical" interface and a second IntraSite Automatic Tunnel Addressing Protocol (ISATAP) tunneling interface, which sends IPv6 packets over an IPv4 network by encapsulating the IPv6 packet in the IPv4 header. You need to configure the physical connection and not the ISATAP one, so list your interfaces to identify the index of the physical adapter.

C:\Users\administrator>netsh interface ipv4 show interfaces

Idx   Met    MTU    State        Name
---   ---   -----   ----------- -------------------
2      10    1500   connected    Local Area Connection
1      50    4294967295 connected Loopback Pseudo-Interface 1

When the adapter is identified, which in this case is index 2, the IP details can be set. They most likely consist of an IP address, a subnet mask, a gateway, and one, possibly two, DNS servers.

To set the IP address, subnet mask, and gateway, run the following and change the information for your environment:

C:\Users\administrator>netsh interface ipv4 set address
name="2" source=static address=192.168.1.232
mask=255.255.255.0 gateway=192.168.1.1

You can now add the DNS servers. The primary DNS server gets an index of 1, the secondary DNS server gets an index of 2.

C:\Users\administrator>netsh interface ipv4 add dnsserver
name="2" address=192.168.1.230 index=1

C:\Users\administrator>netsh interface ipv4 add dnsserver
name="2" address=192.168.1.10 index=2

If you need to configure primary and secondary Windows Internet Name Service (WINS) servers, use the same syntax as for adding DNS servers but use winsserver instead of dnsserver. The first index would be the primary WINS server and the second index the secondary WINS server.

If you now examine the IP information with ipconfig/all, the configured settings are displayed, as shown in the following example:

C:\Users\administrator>ipconfig /all

Windows IP Configuration

    Host Name . . . . . . . . . . . . : savtstcore01
    Primary Dns Suffix . . . . . . .  :
    Node Type . . . . . . . . . . . . : Hybrid
    IP Routing Enabled. . . . . . . . : No
    WINS Proxy Enabled. . . . . . . . : No

Ethernet adapter Local Area Connection:

    Connection-specific DNS Suffix . . :
    Description . . . . . . . . . . . .: Intel 21140-Based PCI
Fast Ethernet Adapter (Emulated)
    Physical Address. . . . . . . . . : 00-03-FF-0E-0D-F9
    DHCP Enabled. . . . . . . . . . . : No
    Autoconfiguration Enabled . . . . : Yes
    Link-local IPv6 Address . . . . . :
fe80::c49a:b729:8c8b:471e%2(Preferred)
    IPv4 Address. . . . . . . . . . . : 192.168.1.232(Preferred)
    Subnet Mask . . . . . . . . . . . : 255.255.255.0
    Default Gateway . . . . . . . . . : 192.168.1.1
    DNS Servers . . . . . . . . . . . : 192.168.1.230
					192.168.1.10
    NetBIOS over Tcpip. . . . . . . . : Enabled

If you need to remove a DNS server, or more likely a WINS server, after you finally get it killed off, use the del keyword instead of add. For example:

Netsh interface ipv4 del winsserver name="2"
address=192.168.1.10

Setting the Time Zone

The date and time are easy to set using the date and time command lines, but using a command-line method to set the time zone is trickier. There are Registry areas for the time zone. However it's not necessary to use the Registry. Remember that Control Panel is unavailable in Server Core except for two applets. The Date and Time Control Panel applet is one of them; start it via the following command:

control timedate.cpl

After loading the applet, perform the normal date/time and time zone configurations. Note that in a domain environment, the time synchronizes; however, you might need to set the time zone.

Joining a Domain

It is most likely your servers are part of a domain, and unless the server was preprovisioned during deployment or used an answer file, you need to configure your server to join a domain. After the IP configuration is configured with the correct DNS servers, the computer name is set, and the time configuration is correct, you can join the domain.

To join a domain, use the same command that you used to rename the computer: netdom. Full help can be seen by running netdom join /?, which gives information on specifying a specific organizational unit (OU) to place the computer into. However, at the most basic level, pass the domain you want to join, the account to use to perform the join, and its password:

C:\>netdom join %computername% /domain:virt.savilltech.net
/userd:administrator /passwordd:*
Type the password associated with the domain user:
*******
The computer needs to be restarted in order to complete the operation.

The command completed successfully.

Replace the domain name with your domain, and then restart the server. After the reboot, you can log on as a domain user, which confirms the domain join operation worked successfully. You can also verify your connectivity to the domain using the netdom /verify command as in the following example:

C:\Users\administrator.VIRT>netdom verify %computername%
/domain:virt.savilltech.net
The secure channel from SAVTSTCORE01 to the domain VIRT.
SAVILLTECH.NET has been verified. The connection
is with the machine \\SAVTSTDC01.VIRT.SAVILLTECH.NET.

The command completed successfully.

Configuring International Settings

The second Control Panel applet available in Server Core is the Regional and Language Options applet. It enables the configuration of the keyboard layouts, languages, and location. To launch the applet, run the following command and configure as a normal installation:

Control intl.cpl

Setting the Default Scripting Engine

With Server Core, you do a lot via various scripts executed by the Windows Scripting Host, which has a GUI and a command-line engine. By default the GUI engine is the preferred tool, which goes against the idea of managing Server Core from the command line and requires you to remember to put cscript at the start of your scripts to process the script using the command-line interpreter.

To change the Windows Scripting Host to use the command-line interpreter by default, use the following command:

C:\Windows>cscript //H:CScript //NOLOGO //s
Command line options are saved.
The default script host is now set to "cscript.exe".

If you've enabled cscript as the default engine, you don't need to type it every time.

[Previous] [Contents] [Next]