How-To: Windows Server 2025 Installation and Best Practices

AI Preview

Is this content worth your time? Use the quick preview to decide.

Welcome to Techaptic!

In today’s guide, we dive deep into the deployment of Windows Server 2025, focusing on a secure and optimized baseline for production environments. While the operating system offers impressive new features like Hot-patching and SMB over QUIC, a truly robust server requires meticulous attention to post-installation configurations. We cover the entire workflow: from setting up Virtual TPM and NVMe optimization to configuring static IPs, secure RDP access, and automated service hardening using PowerShell. Follow along to ensure your infrastructure is built on a solid foundation of best practices.

🔗 Helpful Links

Video Tutorial

Used Commands


Disabling unnecessary Windows services

<#
.SYNOPSIS
Windows Server 2025 Base Security Hardening Script
.DESCRIPTION
This script stops and disables unnecessary default services on a newly installed
Windows Server 2025 to reduce the attack surface and optimize performance.
.NOTES
Author: Techaptic
Warning: If this server will act as a Print Server, remove the "Spooler" service from the list.
#>

$servicesToDisable = @(
"Spooler", # Print Spooler (Crucial to disable against PrintNightmare unless it's a Print Server)
"MapsBroker", # Downloaded Maps Manager (Unnecessary on servers)
"lfsvc", # Geolocation Service (Location services are not required for infrastructure servers)
"bthserv", # Bluetooth Support Service (Bluetooth is not used on servers)
"XblAuthManager", # Xbox Live Auth Manager (Unnecessary Desktop Experience service)
"XblGameSave", # Xbox Live Game Save (Unnecessary Desktop Experience service)
"XboxGipSvc", # Xbox Accessory Management Service (Unnecessary)
"XboxNetApiSvc", # Xbox Live Networking Service (Unnecessary)
"WSearch", # Windows Search (Causes high I/O; disable unless it's a dedicated file server)
"RemoteRegistry", # Remote Registry (Critical security risk; allows remote registry modification)
"DiagTrack", # Connected User Experiences and Telemetry (Privacy and security baseline)
"SysMain", # SysMain/Superfetch (Causes unnecessary disk I/O and memory usage on servers/VMs)
"Audiosrv", # Windows Audio (Unnecessary unless configured as an RDS Session Host)
"AudioEndpointBuilder", # Windows Audio Endpoint Builder (Dependency for Windows Audio)
"CDPSvc", # Connected Devices Platform Service (Mobile/Bluetooth sync is unnecessary)
"SSDPSRV", # SSDP Discovery (UPnP-based discovery introduces security risks)
"upnphost", # UPnP Device Host (Security risk)
"WlanSvc" # WLAN AutoConfig (Disable unless the server utilizes a wireless network adapter)
)

Write-Host "Techaptic - Windows Server 2025 Service Hardening Process Initiated..." -ForegroundColor Cyan
Write-Host "------------------------------------------------------------------" -ForegroundColor Cyan

foreach ($serviceName in $servicesToDisable) {
# Check if the service exists on the system
$service = Get-Service -Name $serviceName -ErrorAction SilentlyContinue

if ($service) {
Write-Host "Processing: $serviceName..." -NoNewline

try {
# Stop the service if it is currently running
if ($service.Status -eq 'Running') {
Stop-Service -Name $serviceName -Force -ErrorAction Stop
}

# Change the startup type to Disabled
Set-Service -Name $serviceName -StartupType Disabled -ErrorAction Stop
Write-Host " [SUCCESS] (Stopped and Disabled)" -ForegroundColor Green
}
catch {
Write-Host " [ERROR] ($($_.Exception.Message))" -ForegroundColor Red
}
}
else {
Write-Host " $serviceName service was not found on this system (Already disabled/missing)." -ForegroundColor Yellow
}
}

Write-Host "------------------------------------------------------------------" -ForegroundColor Cyan
Write-Host "Process Completed. It is recommended to restart the server to apply changes cleanly." -ForegroundColor Green

Quiz


QUIZ-EN-How-To-Windows-Server-2025-Installation-and-Best-Practices-10
  • Question
  • Question
  • Question
  • Question
  • Question
  • Question
  • Question
  • Question
  • Question
  • Question

Full Transcript

Rating

Post Rating (EN)
Scroll to Top