Estimated reading time: 3 minutes
Mastering Windows Server Core with Command Line Power
Windows Server Core 2022 strips the GUI fat, leaving a lean, mean machine that thrives on command-line control—and in 2025, it’s your ticket to lightweight, secure server management. This guide’s your deep dive into running Server Core like a pro, from setup to daily ops, role installs, remote tricks, and troubleshooting—all via PowerShell and CMD. Whether you’re an IT vet slashing overhead or a newbie embracing the CLI life, it’s packed with gritty scripts, step-by-step flows, and real-world fixes. From bare-metal boots to domain joins, this is your Server Core playbook—rugged, detailed, and all-in.
Step 1: Install Server Core
Grab the Goods: Snag the Server 2022 ISO from Microsoft Volume Licensing or eval center. Burn it to USB with Rufus—pick “Windows Server 2022 Core” at setup. No GUI fluff here, just the essentials.
Boot and Deploy: Plug in, boot, and mash through the installer—language, time zone, then “Install Now.” Choose “Windows Server 2022 Standard (Core)” or Datacenter—your call. Partition your drive, let it rip (10-20 mins on SSD), and reboot. You’ll land at a stark CMD prompt: sconfig
is your first friend.
Step 2: Initial Config
Set Admin Password: At the CMD prompt, type sconfig
, hit 2, and punch in a password—make it brutal (e.g., “S3rv3rC0r3!”). Exit with 15.
Network Setup: Back in sconfig
, hit 8. Pick your NIC (usually “1”), set static IP if needed:
netsh interface ipv4 set address name="Ethernet0" static 192.168.1.10 255.255.255.0 192.168.1.1
DNS too:
netsh interface ipv4 set dns name="Ethernet0" static 8.8.8.8
Ping google.com
to test—works? You’re online.
Name It: In sconfig
, hit 1, set a hostname (e.g., “CoreDC01”), reboot with shutdown /r
.
Step 3: Add Roles and Features
PowerShell Time: From CMD, type powershell
. Install AD DS for a DC:
Install-WindowsFeature -Name AD-Domain-Services -IncludeManagementTools
Promote to DC (swap “domain.local” for yours):
Install-ADDSForest -DomainName "domain.local" -InstallDns -SafeModeAdministratorPassword (ConvertTo-SecureString "S3rv3rC0r3!" -AsPlainText -Force) -Force
Reboots after—takes 5-10 mins. Hyper-V’s another beast:
Install-WindowsFeature -Name Hyper-V -IncludeManagementTools -Restart
Check It: List roles:
Get-WindowsFeature | Where-Object {$_.InstallState -eq "Installed"}
Step 4: Daily Ops
Updates: Force updates:
Install-Module PSWindowsUpdate -Force; Import-Module PSWindowsUpdate; Get-WUInstall -AcceptAll -AutoReboot
User Add: Drop a local user:
net user "techy" "P@ssw0rd123" /add; net localgroup "Administrators" "techy" /add
Disk Check: Scope drives:
Get-Disk | Select-Object Number,FriendlyName,PartitionStyle,Size
Step 5: Remote Management
Enable Remote: From PowerShell:
Enable-PSRemoting -Force; Set-NetFirewallRule -Name "WINRM-HTTP-In-TCP" -Enabled True
From another PC (with RSAT), connect:
Enter-PSSession -ComputerName "CoreDC01" -Credential (Get-Credential)
MMC Snap-In: On a GUI box, run “mmc,” add “Computer Management,” target “CoreDC01”—old-school but works.
Troubleshooting
No Network: Probe NICs:
Get-NetAdapter | Select-Object Name,Status,LinkSpeed
Reset with netsh winsock reset
if borked. Role Fail: Check logs:
Get-EventLog -LogName "System" | Where-Object {$_.Source -eq "Service Control Manager"} | Select-Object -First 10
Stuck Prompt: Kill with Ctrl+C
, restart with shutdown /r
.
Best Practices
- Patch Hard: Monthly updates via
Get-WUInstall
—no slackers. - Backup: Use
wbadmin
—schedule daily system state dumps. - Lean: Skip GUI tools locally—PowerShell’s your razor.
- Log It: Pipe output to files:
Get-Service | Out-File "C:\Logs\services.txt"
FAQ
Q: Why Core over GUI? A: Less attack surface, lower RAM—GUI’s a hog.
Q: Remote GUI possible? A: Nope—use RSAT or PowerShell remoting, Core’s CLI-only.
Q: Stuck in CMD? A: Type powershell
—it’s there, just hidden.
Q: Roll back a role? A: Uninstall with:
Remove-WindowsFeature -Name "AD-Domain-Services"
Glossary
- Server Core: GUI-less Windows Server—lean and mean.
- AD DS: Active Directory Domain Services—identity king.
- PSRemoting: PowerShell’s remote control—CLI over network.
- Sconfig: Server Core’s quick-config lifeline.
Share this content:
Discover more from TechyGeeksHome
Subscribe to get the latest posts sent to your email.