A Windows Server hardening baseline is not a checklist you run once and forget; it is a layered set of controls that each reduce a specific class of exposure without breaking the applications the server exists to run. The failure mode of most hardening projects is not that too little is done, but that controls are applied in the wrong order: an account policy is tightened before service accounts are inventoried, a firewall is hardened before the passive FTP or RDP ports are documented, and the application team discovers the breakage at 2am after a patch cycle. This guide describes a baseline that ships in layers, each layer testable on its own, with rollback steps defined before the change window opens.
The order that works in practice is identity first, then network surface, then host configuration, then monitoring. Identity comes first because nearly every other control depends on knowing which accounts exist and what they are for. Network surface comes second because it is the layer most likely to break an application, and you want to discover that while you still have a change window. Host configuration and monitoring come last because they are largely additive. If you are staging a fresh instance from scratch, the baseline in this article assumes a patched server already provisioned — see the full setup guide for provisioning a clean Windows instance if you have not reached that point yet.
Layer 1: Account Inventory and Service Identity
Before you touch a single policy, export the local account list and the members of Administrators, Remote Desktop Users, and any application-specific groups. Get-LocalUser and Get-LocalGroupMember give you the raw inventory, but the important part is annotating each entry with its owner. A built-in account you cannot attribute is a control gap, not a convenience. Rename the built-in Administrator account, disable it if a named administrative account exists, and confirm that the Guest account is disabled in the SAM.
Service identities deserve their own pass. Any service running as LocalSystem has effectively unlimited local privilege, and any service running as a domain account has whatever the domain grants that account. Replace LocalSystem with a virtual service account (NT SERVICE\<ServiceName>) wherever the service supports it, and replace interactive logon accounts in scheduled tasks with a dedicated service account or a gMSA. This single layer typically removes the most lateral-movement value from a compromised application process, because there is no longer an over-privileged token sitting in memory.
Layer 2: Network Surface and the Firewall Policy
The default Windows firewall profile blocks inbound traffic that has no explicit rule, but many hosting images and application installers quietly add broad allow rules. Audit with Get-NetFirewallRule -Direction Inbound -Enabled True and look for rules whose RemoteAddress is Any and whose LocalPort is Any. Those are the rules that make an exposed server look like a flat network. Replace them with port-specific rules scoped to the source ranges that actually need access: the RDP port restricted to your management IPs, HTTP and HTTPS open to the world only if the server is a web front end, and everything else denied between zones.
Document every port you open in the same change record as the rule. The single most common cause of an application breaking after firewall hardening is an undocumented listener — a licensing service on a random high port, a reporting agent, or a secondary bind address for a web application. Enumerate actual listeners with Get-NetTCPConnection -State Listen and reconcile them against the firewall rules; anything listening but not in the change record is a decision you have not made yet. If you are choosing where to host this server, our Windows hosting comparison covers which providers allow custom firewall rules at the hypervisor level rather than only inside the guest.
Layer 3: Protocol and Legacy Service Removal
Disable SMBv1 as a feature, not as a registry toggle, and confirm with Get-SmbServerConfiguration that EnableSMB1Protocol reports false. Remove or stop legacy services that have no current function: Telnet, FTPSVC if you use SFTP instead, RemoteRegistry unless a monitoring product depends on it, and WinRM only if you have hardened it rather than leaving it on defaults. Disable LLMNR and NetBIOS over TCP/IP on the network adapters; neither is needed in a routed hosting environment and both are reliable name-resolution poisoning vectors.
TLS deserves its own sub-step. Remove TLS 1.0 and 1.1 from the SCHANNEL\Protocols registry keys, disable SSL 2.0 and 3.0, and set the cipher suite order explicitly rather than inheriting the operating system default. Then verify with an external scanner rather than trusting the registry — the effective policy is the intersection of machine policy, TLS settings, and the .NET framework’s own SchUseStrongCrypto value, and .NET applications frequently negotiate a weaker protocol than the operating system allows.
Layer 4: Logon Policy Without Lockout Cascades
Account lockout thresholds are where hardening most often causes an outage that looks like an attack. A threshold of five attempts sounds reasonable until a service account with a stale cached password retries every sixty seconds and locks itself out continuously, taking the application down. Before lowering the threshold, identify every service that authenticates with a stored credential, and move those to gMSA or certificate-based authentication. Only then apply a threshold, and monitor for 4625 events from service identities rather than assuming the lockout traffic is malicious.
For RDP specifically, restrict interactive logon to named administrative accounts and remove Administrators group access for day-to-day application management. Enable Network Level Authentication, set an idle session limit that matches how the server is actually used, and configure the RDP listener to accept connections only from the management network. A hardened server still fails if an attacker reaches the logon screen with valid credentials; the objective of this layer is to shrink the population of accounts that could ever produce a successful interactive logon.
Layer 5: Application Compatibility Gate
Before any of the above is promoted from a pilot server to production, run a compatibility pass on the application itself. AppLocker or WDAC in audit mode for a week will show you every binary the application launches from paths a default policy would block — SQL Server’s own components, .NET compilation caches, and third-party antivirus helpers are the usual offenders. Audit mode output tells you exactly which path rules to add, which is far cheaper than discovering the block during a processing run.
Script execution policy and PowerShell logging are part of this layer as well. Set the execution policy to RemoteSigned at minimum, enable module logging and script block logging through Group Policy, and confirm that the application’s own maintenance scripts are signed or located in a trusted path. Hardening that blocks the application team’s routine scripts will be undone by the first person who sets the policy back to Bypass, which is exactly the outcome a baseline is meant to prevent.
Layer 6: Auditing, Forwarding, and Detection Readiness
Enable the advanced audit subcategories you actually intend to alert on, rather than the three coarse categories that produce enormous noise. Process creation with command line inclusion, logon and logoff, account management, and object access for the configuration directories are the high-value categories. Then forward the Security log to a collector outside the server; a local log that an attacker can clear is not an audit trail. Windows Event Forwarding with a source-initiated subscription is the native mechanism, and it costs a single outbound port.
Finally, define what “done” looks like for the baseline. That means an export of the resulting policy, a documented exception list with owners and review dates, and a quarterly re-run of the audit scripts that detects drift. Controls that are not re-measured silently decay: a firewall rule added for a temporary diagnostic in March becomes a permanent hole by July. A baseline without a drift check is a one-time event, not a control.
The Baseline Checklist
| Layer | Control | Verify With | Breaks If |
|---|---|---|---|
| Identity | Built-in Administrator renamed or disabled; Guest disabled | Get-LocalUser | Password recovery process assumes default name |
| Identity | Services run as virtual or managed accounts | Get-CimInstance Win32_Service | Service depends on interactive profile |
| Network | No inbound allow rule with any-to-any scope | Get-NetFirewallRule | Undocumented listener exists |
| Network | RDP scoped to management ranges | Set-NetFirewallRule -RemoteAddress | Admin works from home IP |
| Protocol | SMBv1 disabled as a feature | Get-SmbServerConfiguration | Legacy NAS or scanner requires it |
| Protocol | TLS 1.0/1.1 disabled, cipher order set | External scanner | .NET app pins legacy protocol |
| Policy | Lockout threshold after service inventory | Event 4625 baseline | Stale cached service credential |
| Policy | NLA required; idle session limit set | RDP client policy | Legacy client cannot negotiate |
| App | AppLocker/WDAC audit mode for 7 days | AppLocker event log | Unsigned maintenance scripts |
| Audit | Advanced audit subcategories enabled | auditpol /get | Log volume exceeds disk budget |
| Audit | Security log forwarded off-host | Collector subscription | Outbound WinRM blocked |
Run the checklist top to bottom on a pilot instance, keep the exported policy as the artifact of record, and re-run the verification column as a scheduled task that reports drift rather than applying changes. The layers above are deliberately independent: if the identity layer has to be rolled back because of a misidentified service account, the network and audit layers stay in place and continue to reduce exposure while the identity work is corrected.



