Windows Server initial configuration
-
Phase 0: Before you start
-
Phase 1: The foundation
-
Phase 2: Core administration and security
-
Phase 3: Enterprise infrastructure
-
Phase 4: Troubleshooting step by step
-
Phase 5: Final project and career
A freshly installed server is a bit like a new phone you haven’t set up yet. It works, but it has a random name, no fixed address and old software, and Windows Server initial configuration is the short list of jobs every admin does before that server is allowed to do anything useful.
You’ll give DC01 and SRV01 their proper names and fixed addresses on LabNet, set DNS and the time zone, install updates and switch on Remote Desktop. We’ll do it with sconfig, Server Manager and PowerShell, so you’re comfortable on any server whether it has a desktop or not.
| Time | You need | By the end you can |
|---|---|---|
| About 60 minutes, including update downloads | DC01 and SRV01 from Lesson 5 | Rename a server, set a static IP, gateway and DNS, set the time zone, install updates, enable Remote Desktop, and check all of it from PowerShell |
What it is, in one line
Windows Server initial configuration is the first round of changes after the install (computer name, fixed IP address, DNS, time, updates and remote access), all done before the server takes on any role.
In Simple Words
A new employee’s first morning
On a new employee’s first day, someone hands them a name badge, a desk number, a phone extension and a laptop with the latest updates, and until that’s done nobody can find them and they can’t get much work done.
A new server needs the same things. Its name badge is the computer name, and its desk number is the IP address, which must never change so others always know where to find it. DNS is the phone directory, and the updates are, well, updates. Get this wrong and people keep walking to the wrong desk, but get it right once and the server stays easy to find for as long as it runs.
Engineer's View
What each setting does and why servers are different
Computer name. Setup gives the server a random name like WIN-4JH2T8QK1VD.
Replace it with a name from your naming standard that says what it is, where it is and a number, such as DC01 or HYD-FS-02. NetBIOS names can be up to 15 characters long. Rename before you install any roles, because some of them (Active Directory and Certificate Services, for example) make a rename hard later on.
Static IP address. Laptops pick up their addresses from DHCP.
Servers get fixed ones, so DNS records, firewall rules and clients that connect by address keep working. You set four things: the IP address, the prefix length (24 means 255.255.255.0), the default gateway (the way out of the subnet) and the DNS servers.
DNS servers. For the moment DC01 and SRV01 use a public resolver (1.1.1.1), which lets them reach the internet for updates and activation.
From Lesson 11, DC01 becomes the DNS server and every machine in the domain points to it instead. You’ll see domain members pointing at a public DNS server again and again at work, and it’s one of the most common Active Directory faults there is.
Time. Set the right time zone now. Later on, domain members get their time from the domain controllers automatically, and Kerberos sign-in fails once clocks drift more than five minutes apart (more on that in Lesson 21).
Updates. The build on the ISO is months old, so the first round of updates is large, and you should patch before the server is exposed to anything.
Remote Desktop. Admins hardly ever sit at a server’s console.
To turn on Remote Desktop you also need a firewall rule, and each is a single command. In Lesson 13 you’ll manage a Server Core machine without touching its console at all.
Three tools, same result. sconfig is a text menu that’s on every Windows Server, Server Core included.
Server Manager’s Local Server page shows the same settings as clickable links, and PowerShell can do all of it and repeat it on fifty servers.
How it works, step by step
This is the order admins follow on every new server. The name and address come first because the roles you add later remember them:
- Rename the server and restart.
- Set the static IP, prefix length and default gateway.
- Set DNS (a public resolver for now, the domain controller later) and the time zone.
- Test that the server reaches the gateway and resolves names, and then let Windows activate.
- Install updates and restart.
- Enable Remote Desktop and its firewall rule.
- Take a snapshot so you can return to a clean, configured server.
Any of the three tools can do every step. This is when each one makes sense:
In the lab you’ll use sconfig on DC01 and PowerShell on SRV01, then check both with the same PowerShell commands. Get to know sconfig well, because on Server Core it’s often the only menu you’ll have.
Hands-on Lab: Windows Server initial configuration for DC01 and SRV01
Before you run any command, double-check it
Read every command twice before you press Enter. Check the target: the system or account, the IDs, the names and the sizes. These commands are for learning and were tested in our lab, not on your system. At work, run the read-only list commands first, follow your change process, make sure a backup exists, and ask a second person to check anything that changes or deletes data. You run them at your own risk.
Start DC01 and SRV01 (VBoxManage startvm DC01, and the same for SRV01) and sign in to both. You’ll configure DC01 with sconfig in steps 1 to 4 and SRV01 with PowerShell in step 5, then check and finish both in steps 6 and 7. These are the addresses to use:
| Server | IP address | Prefix | Gateway | DNS (for now) |
|---|---|---|---|---|
| DC01 | 10.0.0.10 | 24 | 10.0.0.1 | 1.1.1.1 |
| SRV01 | 10.0.0.20 | 24 | 10.0.0.1 | 1.1.1.1 |
1Open sconfig on DC01 and rename the server
In DC01, open PowerShell as administrator and run:
sconfigA numbered menu appears with items like Computer name, Remote management, Install updates, Remote desktop, Network settings and Date and time. Type 2 (Computer name), press Enter, type DC01 and answer Y when it offers to restart.
✅ Checkpoint: After the restart, the sign-in screen and sconfig’s header show DC01 as the computer name.
2Give DC01 its static IP address
Open sconfig again and pick 8 (Network settings). Choose the adapter’s index number and then 1 to set the address. Pick S for static, enter 10.0.0.10, type the subnet mask 255.255.255.0 and give 10.0.0.1 as the gateway.
✅ Checkpoint: sconfig shows the adapter with IP 10.0.0.10 and gateway 10.0.0.1.
3Set DNS, time zone and Remote Desktop
While you’re still in Network settings, pick 2 (Set DNS servers), enter 1.1.1.1 as the preferred server and leave the alternate empty. Back at the main menu, pick 9 (Date and time) and set your time zone in the window that opens. After that choose 7 (Remote desktop), then E to enable it, and the option that only allows clients with Network Level Authentication.
✅ Checkpoint: sconfig’s main menu shows Remote desktop: Enabled.
4Install updates on DC01
In sconfig pick 6 (Install updates), then 1 (All quality updates), then A to install everything. sconfig searches Windows Update and downloads and installs whatever it finds, and the first round can easily take 20 minutes or longer. Restart when it asks and keep running option 6 until nothing new turns up.
✅ Checkpoint: Option 6 reports that no applicable updates were found.
5Configure SRV01 with PowerShell
In SRV01, open PowerShell as administrator and paste this whole block:
$nic = 'Ethernet'
New-NetIPAddress -InterfaceAlias $nic -IPAddress 10.0.0.20 -PrefixLength 24 -DefaultGateway 10.0.0.1 | Out-Null
Set-DnsClientServerAddress -InterfaceAlias $nic -ServerAddresses 1.1.1.1
Set-TimeZone -Id 'India Standard Time'
Set-ItemProperty 'HKLM:\System\CurrentControlSet\Control\Terminal Server' -Name fDenyTSConnections -Value 0
Enable-NetFirewallRule -DisplayGroup 'Remote Desktop'
Rename-Computer -NewName SRV01 -RestartPut in your own time zone; Get-TimeZone -ListAvailable shows the IDs.
If your adapter has a name other than Ethernet, Get-NetAdapter shows what it’s really called. SRV01 restarts as SRV01, and then you install its updates the same way as in step 4 (sconfig option 6).
✅ Checkpoint: SRV01 restarts and its sign-in screen shows the name SRV01.
6Check both servers the same way
On DC01 (and then on SRV01), run these one at a time:
Get-NetIPConfiguration
Test-NetConnection 10.0.0.1
Resolve-DnsName www.microsoft.com -Type A | Select-Object -First 1 Name, Type, IPAddressOn DC01 you should see something like this:
InterfaceAlias : Ethernet
InterfaceIndex : 6
InterfaceDescription : Intel(R) PRO/1000 MT Desktop Adapter
NetProfile.Name : Network
IPv4Address : 10.0.0.10
IPv4DefaultGateway : 10.0.0.1
DNSServer : 1.1.1.1
ComputerName : 10.0.0.1
RemoteAddress : 10.0.0.1
InterfaceAlias : Ethernet
SourceAddress : 10.0.0.10
PingSucceeded : True
PingReplyDetails (RTT) : 0 ms
Name Type IPAddress
---- ---- ---------
e13678.dscb.akamaiedge.net A 23.45.67.89
Those three commands test three layers: the address settings are right, the gateway answers and DNS turns a name into an address. When something’s wrong on a real server, this is the order you check in. Your DNS answer will be different, and that’s fine as long as you get one.
✅ Checkpoint: Both servers show the right IP and gateway, PingSucceeded is True, and Resolve-DnsName returns an address.
7Confirm activation and take a snapshot
On each server, check that the evaluation has now activated:
cscript //nologo C:\Windows\System32\slmgr.vbs /xprYou should see something like this:
Windows(R), ServerDatacenterEval edition:
Timebased activation will expire 17-04-2027 10:42:15Then shut down both servers and run this on your laptop:
VBoxManage snapshot DC01 take "Configured"
VBoxManage snapshot SRV01 take "Configured"✅ Checkpoint: Both servers show an expiry date about 180 days away and have a “Configured” snapshot.
Break It, Then Fix It
Here are two of the most common network mistakes on new servers, running the IP command twice and giving two servers the same address, and both are safe to try on SRV01.
1Break it: set the IP address a second time
On SRV01, run the command from step 5 again, as though you were fixing a typo:
New-NetIPAddress -InterfaceAlias Ethernet -IPAddress 10.0.0.21 -PrefixLength 24 -DefaultGateway 10.0.0.1You’ll get an error like this:
New-NetIPAddress : Instance DefaultGateway already exists
At line:1 char:1
+ New-NetIPAddress -InterfaceAlias Ethernet -IPAddress 10.0.0.21 -Prefi ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (MSFT_NetIPAddress:ROOT/StandardCimv2/MSFT_NetIPAddress) [New-NetIPAddress], CimException
+ FullyQualifiedErrorId : Windows System Error 87,New-NetIPAddressNew-NetIPAddress adds an address rather than replacing one, and since the adapter already has a default gateway the command refuses. It can also leave 10.0.0.21 behind as a second address before it fails on the gateway, so check:
Run this:
Get-NetIPAddress -InterfaceAlias Ethernet -AddressFamily IPv4 | Select-Object IPAddress, PrefixLengthYou might see both addresses:
IPAddress PrefixLength
--------- ------------
10.0.0.21 24
10.0.0.20 24To fix it, remove the extra address so only 10.0.0.20 remains:
Remove-NetIPAddress -InterfaceAlias Ethernet -IPAddress 10.0.0.21 -Confirm:$false
Get-NetIPAddress -InterfaceAlias Ethernet -AddressFamily IPv4 | Select-Object IPAddress, PrefixLengthYou should see this:
IPAddress PrefixLength
--------- ------------
10.0.0.20 24If you want to change an address, remove the old address and route first (Remove-NetIPAddress and Remove-NetRoute) and then run New-NetIPAddress once, or let sconfig do it for you.
✅ Checkpoint: SRV01 has exactly one IPv4 address again: 10.0.0.20.
2Break it: two servers, one address
With DC01 running on 10.0.0.10, give SRV01 that same address:
New-NetIPAddress -InterfaceAlias Ethernet -IPAddress 10.0.0.10 -PrefixLength 24 | Out-Null
Get-NetIPAddress -InterfaceAlias Ethernet -AddressFamily IPv4 | Select-Object IPAddress, AddressStateYou should see something like this:
IPAddress AddressState
--------- ------------
10.0.0.10 Duplicate
10.0.0.20 Preferred
Before it uses an address, Windows asks the network “is anyone already on 10.0.0.10?” DC01 answered, so SRV01 marked the address Duplicate and won’t use it. SRV01’s System event log records the conflict as well, as event ID 4199 from Tcpip with the other machine’s MAC address, and on a real network that MAC is how you track down whatever took the IP.
To fix it, remove the duplicate:
Remove-NetIPAddress -InterfaceAlias Ethernet -IPAddress 10.0.0.10 -Confirm:$false✅ Checkpoint: SRV01 shows only 10.0.0.20 again, and you found event 4199 in its System log.
This happened at work
The server whose address kept moving
A team built a new reporting server in a rush and left it on DHCP, meaning to fix that “after go-live”. Because the DNS record hadn’t been created yet, other servers connected to it by IP address, which got written into their config files.
A few weeks later it was patched and restarted over a long weekend. Its DHCP lease ran out while it was down and it came back with a different address, so on Monday every report failed, and nobody linked the outage to a routine patch.
Finding it took most of the morning, because the server itself looked perfectly healthy. In the end the clue was in ipconfig /all, which showed DHCP Enabled: Yes on a server.
The fix: each server now gets a static address (or a DHCP reservation) from the IP plan before it’s built, along with a DNS record, and apps connect by name rather than raw IP. “DHCP Enabled: No” is on the build checklist too.
The lesson: everything that talks to a server relies on its address staying put, so fix it on day one rather than after go-live.
Common mistakes and troubleshooting
| Mistake or symptom | What happens | What to do instead |
|---|---|---|
| Leaving a server on DHCP | Its address can change after a restart and break everything that uses it | Set a static IP or a DHCP reservation, plus a DNS record |
| “Instance DefaultGateway already exists” | New-NetIPAddress refuses, sometimes after adding a second address | Remove the old address and route first, or use sconfig |
| AddressState: Duplicate | Two machines share an IP; one stops using it | Find the other MAC address (event 4199) and fix the IP plan |
| Wrong prefix length (e.g. /16 instead of /24) | Some hosts on other subnets look “local” and can’t be reached | Check PrefixLength in Get-NetIPAddress against the plan |
| Domain members pointing at public DNS | Joining the domain and finding DCs fail (Lesson 13) | After Lesson 11, point every member at the domain controllers only |
| Renaming a server after installing roles like AD or CA | Roles break or the rename is refused | Rename first, then add roles |
| Remote Desktop enabled but connection refused | The firewall rule is still off | Enable-NetFirewallRule -DisplayGroup “Remote Desktop” |
| Updates “stuck” at 0% | First update after install is large; or no internet | Check Test-NetConnection and DNS, then be patient |
| Wrong time zone | Log timestamps don’t match other servers | Set-TimeZone; later the domain keeps the clocks in sync |
Interview questions
Click a question to open it. Each one is written the way an interviewer would ask it. Under it you will see why they ask it and one way you could answer, in your own words.
Fresher level
1. You’ve just installed a fresh Windows Server. What would you set up first, and in what order?
Why they ask this: Getting the foundations right first saves rework later, and they want to see you know the basic order.
How you might answer: I’d set the computer name, a static IP with the right prefix and gateway, the DNS servers and the time zone, and then do updates and remote management.
The name and IP go first because roles depend on them.
2. Have you used sconfig? What would you use it for?
Why they ask this: It’s the tool that works on every server and matters most on Server Core, so they want to know you’ve used it.
How you might answer: Yes, it’s the text menu built into Windows Server for basic setup. I use it for the name, domain join, network, updates, Remote Desktop and date and time.
On Server Core, where there’s no desktop, it’s the main tool you have locally.
3. There’s no GUI on the server. How would you give it a static IP address using PowerShell?
Why they ask this: Core servers and scripted builds depend on this, so they want to hear you’ve done it without the GUI.
How you might answer: I’d run New-NetIPAddress -InterfaceAlias Ethernet -IPAddress 10.0.0.20 -PrefixLength 24 -DefaultGateway 10.0.0.1.
After that I’d set the DNS servers with Set-DnsClientServerAddress.
2–5 years experience
4. A colleague asks why servers can’t just get their IP from DHCP like laptops do. How would you explain it?
Why they ask this: It shows whether you think about the knock-on effects of a change and how much depends on a server’s address.
How you might answer: I’d tell them firewall rules, DNS records, monitoring and apps often depend on the server’s address, and if it changes after a lease expires or a restart, all of those break.
That’s why servers should have static addresses, or DHCP reservations at the very least.
5. A new server can ping its gateway, but it can’t reach any websites. What would you check next?
Why they ask this: The network path works, so they want to see you move up a layer to name resolution instead of poking at random.
How you might answer: I’d look at DNS next and try Resolve-DnsName on a public name. I’d check the DNS server setting and then make sure DNS traffic on port 53 is allowed out.
If the network uses a proxy, I’d check that after.
6. Two servers are reporting an IP address conflict. How would you track down the other device?
Why they ask this: Guessing which device it is can take hours, so they want to know you’ll use the evidence Windows already gives you.
How you might answer: I’d check the System log for event 4199 from Tcpip, which has the other device’s MAC address, and then look that MAC up in the switch’s address table or the DHCP leases.
Once I’ve found it, I fix whichever device has the wrong setting.
Senior level
7. You’re responsible for hundreds of servers. How would you make sure each one gets the same initial setup?
Why they ask this: At this scale manual setup always drifts, so they want to see you think in automation and standards.
How you might answer: I’d keep a build script or DSC configuration in version control and have the deployment tool run it, with names and IPs coming from an IPAM system.
Each build gets checked automatically against the standard, and any drift is reported.
8. Say you join a team where servers have names like “Ravi-Test” and “App2019”. What naming standard would you suggest, and why?
Why they ask this: Clear names help everyone find the right server fast, especially in the middle of an outage, and they want to see you think about that.
How you might answer: I’d go for short, consistent parts (location, role and number, like HYD-DC-01) within 15 characters, and avoid personal names or app versions because those date quickly.
Then I’d write the standard down and build it into the build process so it’s enforced.
9. When would you choose not to enable Remote Desktop on a server?
Why they ask this: Senior admins know every interactive sign-in leaves something behind, and they want to see you weigh convenience against attack surface.
How you might answer: On Server Core, and on very sensitive servers like domain controllers in a tiered model, where admins manage remotely with PowerShell or Windows Admin Center from a secure admin workstation.
With fewer interactive sign-ins there are fewer cached credentials lying around for an attacker to steal.
Quick quiz
Q1. Why do servers get static IP addresses?
- They are faster
- So their address never changes for clients, DNS and firewall rules
- DHCP is not allowed on servers
Show answer
B — Static addresses keep everything that depends on the server working.
Q2. What does PrefixLength 24 mean?
- Subnet mask 255.255.255.0
- 24 servers on the network
- The gateway is .24
Show answer
A — A /24 prefix is the same as 255.255.255.0.
Q3. Which sconfig option renames the computer?
- 2
- 6
- 8
Show answer
A — 2 is Computer name. 6 installs updates and 8 is Network settings.
Q4. What does AddressState “Duplicate” tell you?
- The address is reserved
- Another device already uses that IP
- The cable is unplugged
Show answer
B — Windows detected an address conflict and won’t use the address.
Q5. In the work story, what was the clue?
- A failed disk
- DHCP Enabled: Yes on a server
- An expired licence
Show answer
B — The server got a new address from DHCP after a restart.
Quick recap
- The order for Windows Server initial configuration is name, static IP, DNS, time zone, test, updates, Remote Desktop and snapshot.
- Servers get static addresses (or reservations) with the right prefix and gateway.
sconfig, Server Manager and PowerShell can all do the job, and PowerShell can repeat it across many servers.- Check in layers:
Get-NetIPConfiguration,Test-NetConnection,Resolve-DnsName. New-NetIPAddressadds an address, so remove the old one before you change it.- Duplicate address state and event 4199 point to an IP conflict.
Next lesson
Lesson 7: PowerShell basics for admins → You’ll learn how PowerShell commands are named, how to find and read help, what objects and the pipeline really are, and how to filter, sort and export the information you need from a server.
Further reading: Windows Server initial configuration
If you want to go further with Windows Server initial configuration, Microsoft’s guide to configuring a server with sconfig on Microsoft Learn is a good next read, and the full plan for this course is on the Windows Server Administration course page.
