I have been working with Windows Server 2008 Server Core versions more and more lately. It seems that more companies have been starting to see the benefit for servers deployed in the perimeter network as well as for key services on the corporate network.
So, after using the following commands to get my servers up, running, and connected to the domain (or to a particular workgroup), I have started to feel like I am back in DOS 6.2x days.
Some of the basic steps that I take on all servers include:
- Reset the server Administrator password – Net.exe user administrator *
- Set the TCP/IP address takes two steps, first, you need to identify the network interface, then you need to set it –
- Netsh interface show interface
- Netsh interface ipv4 set address name "ID" source=static address=192.168.2.200 mask=255.255.255.0 gateway=192.168.2.1
- Add the DNS client settings for the TCP/IP address – Netsh interface ipv4 set dnsservers name=”ID” static 192.168.2.224 primary
- Change the server’s name First find the current name – Hostname
- Then rename the server name – netdom renamecomputer CurrentName /NewName:NewServerName
- Add the server to the domain – Netdom join ServerName /domain:DomainName userd:administrator /password:Pa$$w0rd
- Install PowerShell – ocsetup NetFx2-ServerCore;MicrosoftWindowsPowerShell
- Shutdown and restart the server Shutdown – Shutdown /t 0
- Restart the server - Shutdown /r /t 0
- Setup remote management – winrm –quickconfig
Finally, the other day, I decided that sconfig might be a better solution. From the command prompt in Server Core, type sconfig.exe and you get this:
- To reset the computer name, you press 2 and then type in the new name and press enter.
- To join a specific domain or workgroup, press 1 and then select whether it is a domain or workgroup and then type in the name and credential information.
- To enable Remote Desktop, press 7 and the select the appropriate options.
- To set the TCP/IP address and the DNS client settings, it is really simple, press 8, and then select the appropriate options and enter the appropriate information.
WOW, that is way easier.
Next, to enable the server for remote management in sconfig, select option 4 and you get the sub-options shown here:
All that needs to be done is to select the options one at a time. This is definitely easier.
There are other basic commands that I use that I have not figured out how to use sconfig to replace them, such as: Turning off the Windows Firewall – Netsh advfirewall set allprofiles state off
I am sure that there are more, but these are the basic ones that I use all the time.