Hardening a Windows Server VPS: A Practical Checklist for Admins

A step-by-step checklist for hardening a Windows Server VPS over RDP and PowerShell, covering accounts, RDP exposure, the firewall, legacy protocols, patching, logging and backups.

dns WindowsVPS Team calendar_today schedule5 min read
Hardening a Windows Server VPS: A Practical Checklist for Admins
tocOn this page 9 sections
  1. 1. Lock down administrator accounts
  2. 2. Reduce RDP exposure
  3. 3. Make sure the firewall is on and minimal
  4. 4. Remove what you don't use
  5. 5. Keep Windows and Defender current
  6. 6. Keep UAC on
  7. 7. Turn on logon auditing and actually look
  8. 8. Back up, and test the restore
  9. The checklist at a glance

A new Windows Server VPS is reachable from the whole internet within minutes of going live. Automated scanners will find its RDP port the same day, and they will start guessing passwords. Hardening isn't a single setting. It's a set of small changes that each make an attack less likely to work. This checklist walks through them in a sensible order. Every step can be done from an elevated PowerShell session over Remote Desktop.

Before you start: several of these steps can lock you out if you get them wrong. Keep a second RDP session open while you change accounts, RDP or firewall settings. Confirm that you can open a new connection before you close the old one. Take a snapshot or backup first if your plan includes one.

1. Lock down administrator accounts

The built-in Administrator account is the first username every brute-force tool tries. Create a named admin account for yourself, confirm that it works, and then rename or disable the built-in account.

$pw = Read-Host -AsSecureString "Password"
New-LocalUser -Name "opsadmin" -Password $pw -PasswordNeverExpires:$false
Add-LocalGroupMember -Group "Administrators" -Member "opsadmin"

# After you have signed in successfully as opsadmin:
Rename-LocalUser -Name "Administrator" -NewName "svc-local-old"
Disable-LocalUser -Name "svc-local-old"

Use a long, unique passphrase and keep it in a password manager. If several people manage the server, give each person their own account so that the logs show who did what.

Set an account lockout policy

A lockout policy turns endless password guessing into a few attempts at a time:

net accounts /lockoutthreshold:5 /lockoutwindow:30 /lockoutduration:30
net accounts

The second command shows the settings now in effect. Choose values that slow attackers down without locking out your own team for too long.

2. Reduce RDP exposure

RDP is how you manage the server, and it's also the most attacked service on it. Make it as hard as possible to reach.

Require Network Level Authentication

With NLA turned on, a user has to sign in before a full desktop session is created. This cuts down the attack surface before login:

Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -Name UserAuthentication -Value 1

Allow RDP only from trusted addresses

Limiting RDP to known IP addresses is the most effective change on this list. If you connect from a fixed office IP, a VPN, or a jump host, create an allow rule for that address. Test it, and then disable the broad built-in rules:

New-NetFirewallRule -DisplayName "RDP - trusted IPs" -Direction Inbound -Protocol TCP -LocalPort 3389 -RemoteAddress 203.0.113.10 -Action Allow

# Only after a new connection through the rule above works:
Disable-NetFirewallRule -DisplayGroup "Remote Desktop"

Changing the RDP port reduces noise in your logs, but it isn't a security control on its own. If you do change it, open the new port in the firewall before you restart the service. For more on running a server mainly through remote sessions, see our Windows RDP VPS overview.

3. Make sure the firewall is on and minimal

Check that all three firewall profiles are enabled, then look at what is actually listening:

Get-NetFirewallProfile | Select-Object Name, Enabled, DefaultInboundAction
Set-NetFirewallProfile -Profile Domain,Private,Public -Enabled True

Get-NetTCPConnection -State Listen |
  Select-Object LocalAddress, LocalPort, OwningProcess |
  Sort-Object LocalPort

For each listening port, match the process ID to a service with Get-Process -Id <pid>. Anything you don't recognise or don't need should be stopped or blocked. Database ports especially should almost never be open to the internet.

4. Remove what you don't use

Each installed role and old protocol is one more thing that could be attacked. Start with SMBv1, which modern systems don't need:

Get-SmbServerConfiguration | Select-Object EnableSMB1Protocol
Set-SmbServerConfiguration -EnableSMB1Protocol $false -Force

Then review the installed roles and features, and remove the ones the server doesn't need:

Get-WindowsFeature | Where-Object Installed
# Example: Uninstall-WindowsFeature -Name Web-Ftp-Server

Do the same for services and installed applications. Old remote-support tools left over from setup are a common weak spot.

5. Keep Windows and Defender current

Unpatched software is still one of the most common ways servers get compromised. Use sconfig or the Settings app to check your update settings. Schedule a regular maintenance window so that reboots for updates actually happen. Then confirm that Microsoft Defender is running and up to date:

Get-MpComputerStatus | Select-Object AMServiceEnabled, RealTimeProtectionEnabled, AntivirusSignatureLastUpdated
Update-MpSignature

If you run a different antivirus product, check that it is actually protecting the server rather than just installed.

6. Keep UAC on

Some admins turn off User Account Control because its prompts are annoying over RDP. Keep it on. It stops tools you launch from getting admin rights without you approving it. If the prompt misbehaves in remote sessions, fix the cause instead. Our guide on why the UAC "Yes" button disappears over RDP covers this.

7. Turn on logon auditing and actually look

You can't respond to attacks you never see. Turn on auditing for successful and failed logons:

auditpol /set /subcategory:"Logon" /success:enable /failure:enable
auditpol /set /subcategory:"Account Lockout" /success:enable /failure:enable

Failed logons are recorded as event ID 4625 in the Security log. A quick check shows whether someone is guessing passwords:

Get-WinEvent -FilterHashtable @{LogName='Security'; Id=4625} -MaxEvents 20 |
  Select-Object TimeCreated, Message

A steady flow of 4625 events from many IP addresses usually means RDP is still open to everyone. Go back to step 2.

8. Back up, and test the restore

Hardening lowers your risk but never removes it. Keep copies of important data off the server, so that ransomware or a mistake on the VPS can't destroy both the original and the backup. Our rclone backup guide for Windows Server shows one way to automate this. A backup only counts once you have restored from it at least once.

The checklist at a glance

  • Named admin account created; built-in Administrator renamed or disabled
  • Account lockout policy set
  • NLA required for RDP
  • RDP limited to trusted IP addresses
  • All firewall profiles on; listening ports reviewed
  • SMBv1 disabled; unused roles, services and apps removed
  • Updates scheduled; Defender running and current
  • UAC enabled
  • Logon auditing on; event 4625 checked regularly
  • Off-server backups in place and a restore tested

Go back to this list after any big change, such as a new role, a new admin, or a new application. Settings tend to drift over time, and the defaults rarely tighten back up on their own.

Run this on your own Windows VPS

Get a Windows VPS from WindowsVPS in about 60 seconds, with full Administrator access over RDP, NVMe storage and the Windows license included.

Buy a Windows VPS →

dns

Written by the WindowsVPS Team

We run Windows Server VPS hosting and write these guides from the same setups our customers use: RDP, PowerShell, trading terminals and always-on bots. Questions about a guide? Contact us.

About WindowsVPS Windows VPS guides All articles

Ready to deploy your server?

Windows or Linux VPS — up and running in under 60 seconds.