Introduction
Windows Server 2012 R2 is a mature, enterprise-grade operating system that brought significant improvements to virtualisation, storage, and hybrid cloud integration when it was released. Although it reached end-of-life in October 2023, many organisations continue to run Windows Server 2012 R2 in production, and understanding its installation and initial configuration remains essential for administrators managing legacy infrastructure. This guide walks through a complete bare-metal installation and post-installation configuration.
Prerequisites
Before beginning the installation, ensure your hardware meets the minimum requirements: 1.4 GHz 64-bit processor, 512 MB RAM (2 GB for Server with Desktop Experience), 32 GB disk space, and a DVD drive or USB port for installation media. For production deployments, use at least 4 GB RAM and 60 GB disk. Have your product key and a target IP address plan ready.
Installation from Media
Boot from the Windows Server 2012 R2 installation DVD or USB. Select your language, time, and keyboard settings, then click Install Now. Choose between Server Core (command-line only, recommended for most roles) or Server with Desktop Experience (full GUI). Select the Standard or Datacenter edition based on your virtualisation needs — Datacenter allows unlimited Hyper-V guests.
Initial PowerShell Configuration
After installation, open PowerShell as Administrator and run the initial configuration commands:
# Set computer name
Rename-Computer -NewName 'SRV-WEB01' -Restart
# After restart — set static IP address
New-NetIPAddress -InterfaceAlias 'Ethernet' -IPAddress '192.168.1.10' `
-PrefixLength 24 -DefaultGateway '192.168.1.1'
Set-DnsClientServerAddress -InterfaceAlias 'Ethernet' -ServerAddresses '192.168.1.1','8.8.8.8'
# Set time zone
Set-TimeZone -Id 'GMT Standard Time'
# Verify network configuration
Get-NetIPConfiguration
Enabling Remote Management
Enable WinRM for remote PowerShell management and Server Manager access:
# Enable WinRM
Enable-PSRemoting -Force
Set-Service WinRM -StartupType Automatic
Start-Service WinRM
# Allow remote management through Windows Firewall
Enable-NetFirewallRule -DisplayGroup 'Windows Remote Management'
Enable-NetFirewallRule -DisplayGroup 'Remote Event Log Management'
Enable-NetFirewallRule -DisplayGroup 'Remote Volume Management'
# Verify WinRM is listening
winrm enumerate winrm/config/listener
Configuring Windows Update
Install all available updates immediately after installation:
# Check Windows Update status
Get-WindowsUpdateLog
# Install updates via PowerShell (Windows Server 2012 R2 requires PSWindowsUpdate module)
Install-Module PSWindowsUpdate -Force
Get-WindowsUpdate -AcceptAll -Install -AutoReboot
# Check installed hotfixes
Get-HotFix | Sort-Object InstalledOn -Descending | Select-Object -First 10
Activating Windows Server
Activate your Windows Server 2012 R2 installation:
# Activate with product key
slmgr /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
# Activate online
slmgr /ato
# Check activation status
slmgr /xpr
Get-CimInstance -ClassName SoftwareLicensingProduct | Where-Object {$_.Name -like "*Windows*"} |
Select-Object Name,LicenseStatus
Enabling the Desktop Experience (Server Core Only)
If you installed Server Core and need the GUI temporarily:
# Add Desktop Experience feature
Install-WindowsFeature Server-Gui-Mgmt-Infra,Server-Gui-Shell -Restart
# To remove the GUI later (return to Server Core)
Uninstall-WindowsFeature Server-Gui-Mgmt-Infra -Restart
Security Baseline Configuration
Apply basic security settings immediately after installation:
# Disable SMBv1 (critical security step — prevents WannaCry/EternalBlue)
Set-SmbServerConfiguration -EnableSMB1Protocol $false -Force
# Enable Windows Defender
Set-MpPreference -DisableRealtimeMonitoring $false
# Configure password policy
net accounts /minpwlen:12 /maxpwage:90 /minpwage:1 /uniquepw:5
# Set screen lock timeout
powercfg /setacvalueindex SCHEME_CURRENT SUB_VIDEO VIDEOIDLE 900
powercfg /setactive SCHEME_CURRENT
Verification
Verify the installation is complete and healthy:
# Check Windows version and build
[System.Environment]::OSVersion.Version
(Get-ItemProperty 'HKLM:SOFTWAREMicrosoftWindows NTCurrentVersion').BuildLabEx
# Check disk space
Get-PSDrive C | Select-Object Used,Free
# Check running services
Get-Service | Where-Object {$_.Status -eq 'Running'} | Measure-Object | Select-Object Count
# Check event log for errors
Get-EventLog -LogName System -EntryType Error -Newest 10
Summary
A fresh Windows Server 2012 R2 installation requires renaming the computer, configuring a static IP, enabling WinRM for remote management, installing all updates, activating the OS, and applying the SMBv1 disable security patch. These foundational steps ensure the server is ready for role installation and production use. The next step is adding Windows Server roles relevant to your infrastructure needs.