To rename the computer we will have to enter the current name of the computer, and then specify the user with administrative privileges. Note that we didn’t enter the password in the command, but we will be prompted for it. The /reboot:0 means that the system will reboot 0 seconds after the command executes. The command “ipconfig /all” will also show us the computer name. If we don’t know the current hostname, we can use the command:

etdom renamecomputer %computername% /NewName:<newName>

Network Interface Configuration

To configure basic IP properties we can use NetShell command line tool. The first thing we should know is what interfaces we have. To find this out for IPv4 interfaces we can enter the command:

netsh interface ipv4 show interfaces

This command will list all interfaces and show the index (Idx) and name of each interface, like this:

Show Interfaces Command

To check the current IP configuration we can enter the command:

ipconfig /all

Next, to set a static IP address on Ethernet interface, we would enter the command:

So, in our example we have configured IPv4 interface with the name Ethernet. The address will be static, and the address we want is 192.168.77.131 / 24 (class C subnet mask). We have also configured default gateway.

The next thing to configure is the DNS server. The command to do that is:

Again we have to specify the name of the interface to configure and then set the IP address of the DNS server. In our case, the IP of the DNS server is the same as the default gateway. The “index=1” means that this will be our primary DNS server.

Domain and User Accounts

We should also add user accounts so that we don’t have to use default Administrator account. To do that we can enter the command:

net user <userName> /add *

So we have to specify the name of our new user and use the /add switch. If we enter the *, we will be prompted to specify the user password right now. If we don’t use *, the user will have to specify the password during first log on.

To add some user to our local group, we can enter the command:

net localgroup <groupName> /add <userName>

For example, if we want to add user UWAdmin to the group Administrators, we would enter the command: “net localgroup Administrators /add UWAdmin”. If we want to add a domain user to the local group, we only need to specify the domain on which the user is located.

net localgroup <groupName> /add <domainName>\<userName>

To check the information about the user, we can enter the command:

net user <userName>

Sconfig

The sconfig actually came with the Windows Server 2008 R2, and is a great way to configure our servers. Sconfig is also executed in CMD, but it uses a menu system so it’s easy to work with. To enable sconfig we simply enter the “sconfig” in CMD and hit enter. After that we will see the screen like this:

sconfig Tool

All we have to do now is enter the menu number in order to see more options and to configure certain option. For example, let’s change Windows Update Settings from manual to automatic. To do that we first enter number 5 to select Windows Update Settings from the menu. Then we get a message that we can enter A for automatic or M for manual. We have entered A and hit enter.

Example Configuration in sconfig

Another thing we can configure is how our server will respond to ping. We can do that in menu item 4 (“Configure Remote Management”), and then menu item 3 (“Configure Server Response to Ping”). I usually like to turn it on so I can check network conectivity using ping command. This setting actually configures the firewall to allow ping.

The important thing you should get from this tutorial is that the sconfig tool exists, and that you understand how to use it. Using Sconfig is a great and quick way to configure important settings for our server.

Firewall

As you know, we can remotely connect to a Server Core machine and manage it remotely. For this to work we have to make sure that our firewall will allow this. In order to do that we can enter the command:

Keep in mind that you should disable Windows firewall only if you have a third party firewall, or hardware firewall installed, or if you want to temporarily test something (like network applications or similar).