With all the benefits that Server Core bring such as performance, security and so on. But without the GUI, it’s not easy to do the daily management and maintenance of Hyper-V. If you want to change the computer name or the IP address, the GUI is always the easiest to use. But on the other hand, the command line can bring a fast and an automated process.
That’s why since Windows Server 2012, the Server Core version of Windows and Microsoft Hyper-V Server 2012 comes with the Server Configuration (sconfig). This is a command line with a simple interface to reduce the time for doing the most common tasks in Windows.
In the following screenshot, you can see an example of sconfig’s first page:
sconfig can do this via an intuitive numerical menu to facilitate the Windows configuration.
A simple example is when you have to change the IP address of your computer by using the command line. Have a look into the following command:
netsh interface ip set address "Local Area Connection" static 10.10.10.10 255.255.255.0 10.10.10.1 1
Sometimes it is hard to remember the exact command syntax and this can lead to server misconfiguration.
Using sconfig, the process would be simply to press the numbers 8, 0, and then _1 _from the menu and simply specify the new IP configuration. That’s it.
SCONFIG Options
Besides IP configuration, the sconfig offers 13 other options:
- Domain/workgroup
- Computer name
- Adding local administrator
- Configuring remote management
- Windows update settings
- Downloading and installing updates
- Remote desktop
- Network settings
- Date and time
- Help in improving the product with CEIP
- Logging off the user
- Restarting the server
- Shutting down server
Here are some examples how to set up the most common configurations in your server core without advanced command lines.
To change Domain/Workgroup
- Press 1
- Than press D for Domain or W for Workgroup
- Specify the domain or workgroup name, the necessary username and the password and press Enter
To change the computer name
- Press 2_ _and specify the new computer name.
- Select Yes to restart the computer.
To add a local administrator
- Press 3.
- Enter the account to join the local administrators group and type the user password.
To configure the remote management
- Press 4.
- Select one of the following options: * Allow MMC Remote Management * Enable Windows PowerShell * Allow Server Manager Remote Management * Show Windows Firewall settings
To change Windows update settings
- Press 5.
- Select A_ for automatic or M _for manual.
To download and install updates
- Press 6.
- Select A_ for all updates or R _for recommended updates only.
To enable remote desktop
- Press 7.
- Select E_ to enable or D _to disable.
To configure network settings
- Press 8.
- Select the network adapter number you want to configure and then select one of the existing options: * Set network adapter IP address * Set DNS Servers * Clear DNS Server Settings
To change the date and time
- Press 9_ _and a graphical interface will show up with the date and time settings to be configured.
To restart and shut down the server:
- Press 1+0_ _to join Customer Experience Improvement Program
- Press 1+1_ _for logoff
- Press 1+2_ _to restart the computer
- Press 1+3_ _to shut down the server
- Press 1+4_ _to exit to command line
After these configurations using sconfig and with reduced command line interaction, your server will be ready for the production environment.
How it works
Server Configuration basically runs scripts in the background for every option that has been selected through a numeric menu, making your life much easier. For every number you select, sconfig can run another script to show a submenu or just run the final script to apply the changes you have selected.
Cheers,
Marcos Nogueira azurecentric.com Twitter: @mdnoga
Comments