Hardened Windows Server 2025 Datacenter on Azure User Guide
Overview
This guide covers the deployment and use of Hardened Windows Server 2025 Datacenter on Microsoft Azure, using cloudimg's virtual machine image from the Azure Marketplace.
The image is Microsoft Windows Server 2025 Datacenter with the Desktop Experience (the full graphical interface), Gen2, x64, built from Microsoft's own Windows Server 2025 Datacenter Gen2 image on the Azure Marketplace (MicrosoftWindowsServer:WindowsServer:2025-datacenter-g2, version 26100.33828.261112, which already includes Microsoft's November 2026 cumulative update).
cloudimg hardens it with Microsoft's Windows Server 2025 Security Baseline, version 2602: the security settings Microsoft publishes for Windows Server 2025 on its Download Center (microsoft.com/download/details.aspx?id=55319). The image uses the profile Microsoft's own installer applies to a standalone (non-domain-joined) server: Microsoft's Member Server, Domain Security, Defender Antivirus and Internet Explorer 11 (computer and user) settings, with Microsoft's non-domain-joined adjustment. cloudimg adds its own Remote Desktop and firewall settings, then applies and checks every setting, one by one, when the image is built.
The hardening is not a black box. The same verifier cloudimg runs at build time ships on the image, so you can check every setting on your own server at any time (Step 3), and every place where the image differs from Microsoft's baseline is listed below with the reason.
What's included:
- Windows Server 2025 Datacenter, Desktop Experience, version 24H2, build 26100.33828
- Microsoft's November 2026 cumulative update, included in Microsoft's base image (KB5131079, KB5136489 and KB5127690). Windows Update ran during the build (it installed the Windows Security platform update KB5007651 and the Malicious Software Removal Tool 5.147 (KB890830); the Microsoft Defender Antivirus platform is 4.18.26100.4) and reported nothing pending when the image was captured on 18 November 2026
- Microsoft's Windows Server 2025 Security Baseline, version 2602: 352 settings in Microsoft's non-domain-joined server profile, covering account and lockout policy, user rights, security options, the advanced audit policy, Windows Firewall, Microsoft Defender Antivirus, administrative templates for network, system, Windows components and Internet Explorer 11, and the legacy network (MSS) settings
- cloudimg's additions: Remote Desktop with Network Level Authentication required and the TLS security layer; a firewall rule that allows Remote Desktop (TCP 3389), with every other inbound allow rule turned off except Windows' own core networking rules for ICMP, IPv6 neighbour discovery and DHCP (so path MTU discovery keeps working over a VPN or ExpressRoute); and OpenSSH Server stopped and disabled (Microsoft's Azure image starts it), so Remote Desktop is the only way in until you choose otherwise (Step 6)
- The verifier on the image,
C:\ProgramData\cloudimg\baseline\Test-CloudimgBaseline.ps1: 364 checks, covering the 355 settings and 9 cloudimg checks - Microsoft Defender Antivirus with real-time protection, behaviour monitoring, script scanning, 8 attack surface reduction rules in block mode and cloud-delivered protection; security intelligence 1.463.351.0 at capture, kept current by Defender once your VM is running
- Windows Firewall on for every profile, with inbound connections blocked by default
- The Azure VM agent, so Azure features such as Reset password and Run command work
- Gen2 Hyper-V virtual machine support
- cloudimg's support team is on hand 24 hours a day by email (support@cloudimg.co.uk), with a guaranteed response within 24 hours
No server roles are added. Install Active Directory, IIS, DNS, file services or any other role you need with Server Manager or Install-WindowsFeature (Step 6).
Platform: Microsoft Azure (Gen2 Hyper-V) Administrator account: the user name and password you choose when you deploy the VM. There is no default password on this image.
What cloudimg adds: Microsoft's security baseline, applied and checked
The table lists what is configured, area by area, with the number of settings in each. The area names are the ones the verifier prints in Step 3. Every setting is applied during the build and checked, one by one, before the image is captured, except the 14-character minimum password length, which can only be completed on your deployed VM (explained in the next section). The verifier checks that one as well.
A one-time task runs at the first start of your VM, after Azure has finished setting it up. It applies the 14-character minimum password length and turns the Remote Desktop "Shadow" firewall rule off again (Azure's setup of every new VM turns the whole Remote Desktop rule group on), then removes itself. When it has finished it leaves a marker file, C:\ProgramData\cloudimg\firstboot\done.
| Area (settings) | What is configured |
|---|---|
| Account Policies (8) | Password history of 24 passwords, password complexity on, reversible encryption off, and a minimum password length of 14 characters, applied at first boot. An account locks for 15 minutes after 3 bad sign-in attempts, the bad-attempt count resets after 15 minutes, and the lockout applies to the administrator account too. Microsoft's baseline sets no maximum or minimum password age (see "Password expiry" under Troubleshooting). |
| User Rights Assignment (23) | Sensitive rights are limited to Administrators (for example debug programs, load device drivers, back up and restore files, take ownership, manage the security log) or granted to no one (act as part of the operating system, create a token object, access Credential Manager as a trusted caller, lock pages in memory, trust accounts for delegation). Local sign-in is for Administrators only, network access for Authenticated Users and Administrators, and the Guests group is denied network and Remote Desktop sign-in (see the next section). |
| Security Options (31) | NTLMv2 only (LM and NTLM responses refused) with 128-bit NTLM session security, SMB packet signing required by the SMB client and server, no unencrypted passwords sent to third-party SMB servers, no anonymous enumeration of accounts and shares, remote calls to the local account database limited to Administrators, LDAP client signing negotiated, blank passwords allowed at the console only, the screen locks after 15 minutes of inactivity, and User Account Control in Admin Approval Mode for every administrator, including the built-in one, with elevation prompts on the secure desktop (standard users' elevation requests are refused). |
| MS Security Guide (6) | SMB 1.0 client and server turned off, User Account Control restrictions for local accounts on network logons (see the next section), structured exception handling overwrite protection (SEHOP) on, print driver installation limited to Administrators, and NetBIOS over TCP/IP set to peer-to-peer (P-node), so the server sends no NetBIOS name broadcasts. |
| MSS (Legacy) (4) | IP source routing protection at the highest level for IPv4 and IPv6, ICMP redirects ignored, and NetBIOS name release requests ignored except from WINS servers. |
| Advanced Audit Policy Configuration (24) | 24 audit subcategories, so the Security event log records credential validation, sign-ins, account lockouts, special sign-ins and group membership at sign-in, other sign-in events (such as Remote Desktop reconnections and screen locks), user account and security group changes, process creation, file share and removable storage access, plug and play events, changes to the audit, authentication, authorisation and firewall rule policies, sensitive privilege use, and system integrity, security state and security system extension events. |
| Windows Firewall (19) | The domain, private and public profiles on, inbound connections blocked by default, outbound connections allowed, notifications off, and logging of dropped packets and successful connections for every profile. |
| Administrative Templates: Network (17) | SMB 3.0 as the minimum for the SMB client and server, insecure guest logons off, the SMB authentication rate limiter on (a 2-second delay after each failed attempt), auditing of SMB clients and servers that do not support encryption or signing, remote mailslots off, hardened UNC paths for SYSVOL and NETLOGON, and multicast name resolution (LLMNR) and NetBIOS name resolution off. |
| Administrative Templates: System (23) | LSA protection requested by policy (with the UEFI lock; see cloudimg additions for what makes it take effect on this VM type), command lines included in process-creation events, CredSSP connections only with updated clients, non-exportable credentials accepted from Remote Desktop clients (Restricted Admin mode and Remote Credential Guard), the hash algorithms for Kerberos certificate sign-in set explicitly for the client and the KDC, unauthenticated RPC clients refused, the Early Launch Antimalware boot-start driver policy, external devices that are incompatible with Kernel DMA Protection blocked, the sudo command off, and Group Policy reprocessed even when unchanged. |
| Administrative Templates: Windows Components, Microsoft Defender Antivirus (27 of the 191) | Real-time protection, behaviour monitoring, script scanning and scanning of downloads, attachments and removable drives on; 8 attack surface reduction rules in block mode (among them: block credential stealing from the Local Security Authority, block webshell creation for servers, block abuse of exploited vulnerable signed drivers, block persistence through WMI event subscription, and advanced protection against ransomware); detection of potentially unwanted applications (PUA protection); cloud-delivered protection at the high level, with Block at First Sight and automatic submission of safe samples; and Defender exclusions hidden from local administrators. Network protection is permitted on Windows Server but left off, as in Microsoft's baseline. |
| Administrative Templates: Windows Components, Internet Explorer 11 (136 of the 191) | Microsoft's two Internet Explorer 11 policies: security zones locked to the machine's settings, ActiveX, scripting and Java restricted in the Internet and Restricted Sites zones, Enhanced Protected Mode, SmartScreen, no fallback to SSL 3.0, certificate revocation checks, certificate errors that cannot be ignored, signature checks on downloaded programs, and (for every user) no saved form passwords. |
| Administrative Templates: Windows Components, everything else (28 of the 191) | Remote Desktop: Windows always prompts for the password, high encryption, secure RPC communication and drive redirection off, and the server's own Remote Desktop client never saves passwords. WinRM client and service: Basic authentication and unencrypted traffic off, Digest authentication off for the client, and the service never stores RunAs credentials. PowerShell script block logging; event log sizes of 32 MB (Application, System) and 192 MB (Security); SmartScreen in File Explorer on, set to warn and prevent bypass; AutoPlay and AutoRun off; Windows Installer never installs with elevated privileges; no automatic sign-in of the last user after a restart; and Internet Explorer 11 cannot be started through COM automation. |
| Administrative Templates: Printers (4) | Print spooler remote procedure calls go over RPC over TCP with authentication, and the print spooler accepts incoming RPC over TCP only, with Kerberos. |
| Administrative Templates: Control Panel (2) | No camera and no slide show on the lock screen. |
| cloudimg additions (3) | Remote Desktop requires Network Level Authentication and uses the TLS security layer, both set as policy. LSA protection is also enabled with Windows' own setting (without the UEFI lock), so the Local Security Authority really runs as a protected process: on this VM type (Gen2 without Secure Boot) Microsoft's policy value alone left it in audit mode. The verifier reads the running process's protection level, not just the setting. |
Beyond these settings, cloudimg:
- allows Remote Desktop (TCP 3389) with a rule in the local firewall policy store,
cloudimg: Remote Desktop (TCP-In), and turns every other inbound allow rule off, with two exceptions: Windows' own Remote Desktop rules for port 3389 stay on (the Remote Desktop Shadow rule is off, and the first-boot task turns it off again after Azure's setup), and so do the 16 rules of Windows' Core Networking group for ICMPv4, ICMPv6, IGMP and DHCP that Windows turns on by default. Those carry the ICMP messages path MTU discovery needs (ICMPv4 "Fragmentation Needed" and ICMPv6 "Packet Too Big"), IPv6 neighbour discovery and DHCP, so connections from networks with a smaller MTU, such as a VPN or ExpressRoute, do not stall. The group's three tunnelling rules (IP-HTTPS, Teredo and IPv6 over IPv4), which a server on Azure does not use, are off like every other rule - stops and disables OpenSSH Server
- installs the verifier and a README in
C:\ProgramData\cloudimg, a folder only SYSTEM and Administrators can write to - sets up the one-time first-boot task described above
The verifier's 9 cloudimg checks (CL-01 to CL-09) cover these: Remote Desktop enabled, the firewall rule for Remote Desktop, every firewall profile on with inbound blocked, inbound allowed only for Remote Desktop and Windows' core networking (ICMP, IPv6 neighbour discovery, DHCP), Microsoft Defender Antivirus running, SMB 1.0 not installed, the first-boot task finished and removed, the cloudimg folder's permissions, and LSA protection in force (the Local Security Authority process is running protected).
Where the image differs from Microsoft's baseline, and why
A hardened server that locks you out is not hardened, it is broken. These are the only places where the image differs from the profile Microsoft's installer applies to a non-domain-joined server:
| Setting | What this image does | Why |
|---|---|---|
| "Deny access to this computer from the network" and "Deny log on through Remote Desktop Services" | Guests only | Microsoft's member-server value also denies "Local account and member of Administrators group". On a standalone Azure VM every account is a local account, so the administrator you create at deployment could never sign in over Remote Desktop. Microsoft's own non-domain-joined adjustment empties both rights; cloudimg keeps Guests denied, which is stricter than that adjustment. |
| "Apply UAC restrictions to local accounts on network logons" | On (Microsoft's member-server value) | Microsoft's non-domain-joined adjustment turns it off, so that local administrator accounts get full rights over the network for remote administration. cloudimg keeps the stricter member-server value. Remote Desktop is not affected; a local account that connects over the network in other ways (for example SMB or WinRM) gets a filtered token without administrator rights. If you need remote SMB or WinRM administration with a local account, set the DWORD value LocalAccountTokenFilterPolicy under HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System to 1, understanding that a local administrator's password then gives full administrative control over the network. Open only the ports you need (Step 6). The verifier then reports this one setting as FAIL. |
| Credential Guard and virtualization-based security (Microsoft's separate Credential Guard policy, 8 settings) | Not applied | They need an Azure Trusted Launch VM (Secure Boot and a virtual TPM) and depend on the VM size, so they are left for you to turn on where your VM supports them. |
| Minimum password length of 14 characters | Applied by the one-time first-boot task, right after Azure provisions the VM | Azure accepts 12-character passwords at deployment, and provisioning would fail if the image refused them. The password you set at deployment keeps working; every later change, including Azure's Reset password, needs 14 or more characters. |
| Windows' own inbound firewall rules | Off, except Remote Desktop (TCP 3389) and the 16 Core Networking rules for ICMPv4, ICMPv6, IGMP, DHCP and DHCPv6, which stay on as Windows ships them; the group's three tunnelling rules (IP-HTTPS, Teredo and IPv6 over IPv4) are off | Microsoft's baseline turns the firewall on for every profile with inbound connections blocked unless a rule allows them, and leaves Windows' own allow rules as they are. cloudimg goes further and turns those rules off, but keeps the 16 Core Networking rules, which are Windows defaults that let in only the traffic the network itself needs: path MTU discovery (ICMPv4 "Fragmentation Needed" and ICMPv6 "Packet Too Big"), IPv6 neighbour discovery and DHCP. Without them, connections from a network with a smaller MTU, such as a VPN or ExpressRoute, can stall. The tunnelling rules are not needed on Azure, so they stay off with every other rule. |
| Domain controller settings | Not applied | Microsoft publishes separate domain controller policies. This is a member or standalone server image; if you promote it to a domain controller, review those settings for your environment. |
Prerequisites
- An Azure subscription
- A Remote Desktop client: Remote Desktop Connection (
mstsc) on Windows, Windows App (formerly Microsoft Remote Desktop) on macOS, or Remmina on Linux - The public IP address of the machine you will connect from, so you can allow Remote Desktop from that address only
Recommended size: Standard_D2s_v5 (2 vCPUs, 8 GiB memory) or larger. B-series sizes are fine for light use.
Step 1: Deploy the Virtual Machine
Option A: Azure Portal
- In the Azure Marketplace, search for "Hardened Windows Server 2025 Datacenter cloudimg"
- Select the offer and click Create
- Configure the basics:
- Subscription and Resource group: select or create
- Virtual machine name and Region: your choice
- Size:
Standard_D2s_v5recommended - Under Administrator account, enter a Username and a Password that you choose. Azure refuses reserved names such as "administrator", "admin" and "guest". Use a password of 14 or more characters: Azure accepts 12, but this image requires 14 for every later password change.
- Under Inbound port rules, allow RDP (3389). Azure then opens port 3389 to the whole internet, so restrict it straight after deployment (step 7)
- Click Review + create, then Create
- When the deployment finishes, open the VM's Networking (Network settings) page, edit the inbound rule for port 3389 and set Source to My IP address (or your office or VPN address range)
Do not leave Remote Desktop open to the internet. Administrator account lockout is on in this image: after 3 bad attempts the account locks for 15 minutes. With port 3389 open to everyone, password-guessing bots will keep locking your administrator out, 15 minutes at a time. Restricting the source address stops that. Azure Bastion is an alternative that needs no public RDP port at all.
Option B: Azure CLI
Accept the offer terms once per subscription, then create the VM with no inbound rules. Leave out --admin-password and the CLI asks for the password, which keeps it out of your shell history:
az vm image terms accept --urn cloudimg1647283583153:windows-server-2025-hardened:default:latest
az vm create \
--resource-group myResourceGroup \
--name my-ws2025-hardened \
--image cloudimg1647283583153:windows-server-2025-hardened:default:latest \
--size Standard_D2s_v5 \
--admin-username <your-admin-name> \
--public-ip-sku Standard \
--nsg-rule NONE
Then allow Remote Desktop from your own address only, and read the VM's public IP:
az network nsg rule create \
--resource-group myResourceGroup \
--nsg-name my-ws2025-hardenedNSG \
--name allow-rdp-from-my-ip \
--priority 1000 \
--direction Inbound --access Allow --protocol Tcp \
--destination-port-ranges 3389 \
--source-address-prefixes <your-public-ip>/32
az vm show --resource-group myResourceGroup --name my-ws2025-hardened --show-details --query publicIps -o tsv
Step 2: Connect with Remote Desktop
- Open your Remote Desktop client and connect to the VM's public IP address
- Windows: run
mstsc, enter the IP address and click Connect - macOS: in Windows App, add a PC with the IP address
- Linux: in Remmina, create an RDP connection to the IP address
- When asked for credentials, sign in as
<vm-name>\<your-admin-name>with the password you set at deployment. On Windows, choose More choices, then Use a different account - Accept the certificate warning: the VM uses a self-signed Remote Desktop certificate
Your client must support Network Level Authentication (every current Windows, macOS and Remmina client does). Then, by design:
- Windows asks for your password again. "Always prompt for password" is on, so the server asks for the password itself after your client connects, even if your client already sent or saved it.
- Your local drives are not available inside the session. Drive redirection is off. Move files through storage you control, such as an Azure file share.
- The screen locks after 15 minutes of inactivity. Sign in again with your password.
- User Account Control applies to your administrator too. Open PowerShell or other tools with Run as administrator for administrative tasks, and confirm the prompt.
You can confirm these settings from an elevated PowerShell prompt: the Remote Desktop policy values, the local accounts (only the administrator you created at deployment is enabled), the password and lockout policy, and OpenSSH Server stopped and disabled.

Step 3: Verify every setting yourself
Open PowerShell as administrator (right-click Windows PowerShell, then Run as administrator) and run the verifier that ships on the image:
& 'C:\ProgramData\cloudimg\baseline\Test-CloudimgBaseline.ps1'
It prints every check with PASS or FAIL, then a FAMILY line per area and a summary. There are 364 checks: the 352 settings of Microsoft's baseline, in the areas of the table above; cloudimg's 3 settings (Remote Desktop's Network Level Authentication and TLS, and LSA protection: the cloudimg additions line); and cloudimg's 9 checks of Remote Desktop, the firewall, Defender, SMB 1.0, the first-boot task, the cloudimg folder's permissions and LSA protection in force (the cloudimg line). On a fresh VM every check passes, and the end of the output looks like this:
FAMILY Account Policies: 8 pass, 0 fail
FAMILY Administrative Templates: Control Panel: 2 pass, 0 fail
FAMILY Administrative Templates: Network: 17 pass, 0 fail
FAMILY Administrative Templates: Printers: 4 pass, 0 fail
FAMILY Administrative Templates: System: 23 pass, 0 fail
FAMILY Administrative Templates: Windows Components: 191 pass, 0 fail
FAMILY Advanced Audit Policy Configuration: 24 pass, 0 fail
FAMILY cloudimg: 9 pass, 0 fail
FAMILY cloudimg additions: 3 pass, 0 fail
FAMILY MS Security Guide: 6 pass, 0 fail
FAMILY MSS (Legacy): 4 pass, 0 fail
FAMILY Security Options: 31 pass, 0 fail
FAMILY User Rights Assignment: 23 pass, 0 fail
FAMILY Windows Firewall: 19 pass, 0 fail
BASELINE_SUMMARY phase=all result=PASS total=364 pass=364 fail=0 deferred=0 osBuild=26100.33828
Add -Quiet to print only failures, the FAMILY lines and the summary, or -Json <path> to save the full result. The script exits with code 0 when every check passes, 1 when one fails, and 2 when it could not run (for example, not elevated).

Run it again whenever you change the server's configuration: any setting that has drifted shows as FAIL.
Check Microsoft Defender Antivirus and Windows Firewall directly:
Get-MpComputerStatus | Format-List AMServiceEnabled,AntivirusEnabled,RealTimeProtectionEnabled,BehaviorMonitorEnabled,AntivirusSignatureVersion
Get-NetFirewallProfile -PolicyStore ActiveStore | Format-Table Name,Enabled,DefaultInboundAction
Get-NetFirewallRule -PolicyStore ActiveStore -Enabled True -Direction Inbound -Action Allow | Format-Table DisplayName,Profile,PolicyStoreSourceType
The four Defender values read True, and AntivirusSignatureVersion reads 1.463.351.0 or later. Each firewall profile (Domain, Private, Public) reads Enabled True and DefaultInboundAction Block. The only enabled inbound allow rules are for Remote Desktop on port 3389 and Windows' own Core Networking rules for ICMP, IPv6 neighbour discovery and DHCP (the order can differ):
DisplayName Profile PolicyStoreSourceType
----------- ------- ---------------------
cloudimg: Remote Desktop (TCP-In) Any GroupPolicy
Core Networking - Router Advertisement (ICMPv6-In) Any Local
Core Networking - Destination Unreachable Fragmentation Needed (ICMPv4-In) Any Local
Core Networking - Dynamic Host Configuration Protocol (DHCP-In) Any Local
Core Networking - Dynamic Host Configuration Protocol for IPv6(DHCPV6-In) Any Local
Core Networking - Neighbor Discovery Solicitation (ICMPv6-In) Any Local
Core Networking - Router Solicitation (ICMPv6-In) Any Local
Core Networking - Neighbor Discovery Advertisement (ICMPv6-In) Any Local
Core Networking - Parameter Problem (ICMPv6-In) Any Local
Core Networking - Packet Too Big (ICMPv6-In) Any Local
Core Networking - Multicast Listener Done (ICMPv6-In) Any Local
Core Networking - Destination Unreachable (ICMPv6-In) Any Local
Remote Desktop - User Mode (TCP-In) Domain, Private, Public Local
Remote Desktop - User Mode (UDP-In) Domain, Private, Public Local
Core Networking - Internet Group Management Protocol (IGMP-In) Any Local
Core Networking - Multicast Listener Report v2 (ICMPv6-In) Any Local
Core Networking - Multicast Listener Query (ICMPv6-In) Any Local
Core Networking - Multicast Listener Report (ICMPv6-In) Any Local
Core Networking - Time Exceeded (ICMPv6-In) Any Local
cloudimg: Remote Desktop (TCP-In) is cloudimg's rule in the local policy store; the two Remote Desktop - User Mode rules and the 16 Core Networking rules are Windows' own. The Core Networking rules let in only the ICMP, IGMP and DHCP traffic the network itself needs: without ICMPv4 "Fragmentation Needed" and ICMPv6 "Packet Too Big", path MTU discovery fails and connections over a VPN or ExpressRoute can stall. Every other inbound allow rule is off, including the Remote Desktop Shadow rule and Core Networking's three tunnelling rules (IP-HTTPS, Teredo and IPv6 over IPv4).

Check that the Azure VM agent is running (Azure's Reset password and Run command features depend on it):
Get-Service WindowsAzureGuestAgent, RdAgent | Select-Object Name, Status
Step 4: Confirm the patch level
Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion' | Select-Object EditionID, InstallationType, DisplayVersion, CurrentBuild, UBR
Get-HotFix | Sort-Object InstalledOn -Descending | Select-Object -First 3
EditionID reads ServerDatacenter and InstallationType reads Server (the Desktop Experience). The build reads 26100.33828 (or higher once you have run Windows Update), and the newest updates are KB5131079, KB5136489 and KB5127690, or later ones. Microsoft's November 2026 cumulative update came with Microsoft's base image; Windows Update ran during the build and reported nothing pending when the image was captured.

Step 5: Keeping Windows patched
Windows Update reported nothing pending when the image was captured on 18 November 2026. After that, patch it like any Windows Server: open Settings > Windows Update and install what is offered, or use Azure Update Manager to assess and schedule patching across your Azure VMs. Microsoft supports Windows Server 2025 until November 2029 (mainstream) and November 2034 (extended).
Microsoft's baseline does not change Windows Update's settings, so Windows' own update behaviour applies, together with any patch settings you choose for the VM in Azure. Windows restarts to finish some updates: to control when that happens, set your own maintenance window in Windows Update or manage patching with Azure Update Manager.
Step 6: Adding roles and opening ports
Install roles and features as usual, for example IIS:
Install-WindowsFeature -Name Web-Server -IncludeManagementTools
Inbound traffic is blocked by default, so a role that listens for connections needs a Windows Firewall rule as well as an Azure Network Security Group rule. Some roles add their own firewall rules when installed. Microsoft's baseline does not stop local firewall rules from applying, so a rule you add with New-NetFirewallRule takes effect on every profile, including the Public profile an Azure VM's network uses (on a fresh VM, Get-NetFirewallProfile -PolicyStore ActiveStore shows AllowLocalFirewallRules as True for every profile):
New-NetFirewallRule -DisplayName 'Allow HTTPS inbound' -Direction Inbound -Protocol TCP -LocalPort 443 -Action Allow
Then open the same port in the VM's Network Security Group, from the sources that need it. Re-run Test-CloudimgBaseline.ps1 afterwards. Check CL-04 ("Inbound allowed only for Remote Desktop and Windows core networking") will now report FAIL and name your new rule, which is expected for a port you opened on purpose. Every other line should still pass.
Using SSH instead of, or as well as, Remote Desktop. OpenSSH Server is installed but stopped and disabled. To use it, start it, allow TCP 22 the same way, and open TCP 22 in the Network Security Group from your own address only:
Set-Service sshd -StartupType Automatic
Start-Service sshd
New-NetFirewallRule -DisplayName 'Allow SSH inbound' -Direction Inbound -Protocol TCP -LocalPort 22 -Action Allow
Common Use Cases
- Jump hosts and management servers that should start locked down, with only Remote Desktop open
- Application, web and file servers that need a documented security configuration you can re-check from first boot
- A starting point for your own internal security standard or golden images, built on Microsoft's published baseline
Troubleshooting
"The referenced account is currently locked out"
Three bad password attempts lock the account, including the administrator, for 15 minutes. Wait 15 minutes and try again with the correct password. If it keeps happening, someone else is trying passwords: check that the inbound rule for port 3389 allows only your own address (Step 1).
Forgot the password
In the Azure portal, open the VM, choose Reset password (under Help), keep the mode Reset password, enter your administrator user name and a new password of 14 or more characters. The same from the Azure CLI:
az vm user update --resource-group myResourceGroup --name my-ws2025-hardened --username <your-admin-name> --password '<new-password>'
Password expiry
Microsoft's baseline does not set a maximum password age, so Windows' own default of 42 days applies to your administrator account, as on Microsoft's own Windows Server image: the password you set at deployment expires 42 days later. See it with net accounts (the line "Maximum password age (days)") or in Local Security Policy > Account Policies > Password Policy, where you can also change it to suit your own policy. Change your password before it expires: with Network Level Authentication an expired password cannot be changed at the Remote Desktop sign-in. If it has expired, use Azure's Reset password (above).
Remote Desktop does not connect
- Verify the VM is Running in the Azure portal
- Check that the Network Security Group allows TCP 3389 from your current public IP address. Home and mobile addresses change; update the rule's source if yours has
- Use a client that supports Network Level Authentication, and sign in as
<vm-name>\<your-admin-name> - If you still cannot get in, use Run command in the Azure portal (Operations > Run command > RunPowerShellScript) to inspect the server without Remote Desktop, for example
Get-Service TermServiceorGet-LocalUser
Remote administration over SMB or WinRM with a local account is refused
User Account Control restrictions for local accounts on network logons are on (see "Where the image differs from Microsoft's baseline"), so a local account connecting over SMB or WinRM has no administrator rights. Use Remote Desktop, or change the setting as described in that section.
A service you installed cannot be reached
Check the Windows Firewall rule (Step 6) and the Network Security Group rule. Both must allow the port before traffic reaches your service.
Important Notes
Licensing. The Windows Server licence is included in the price of the Windows virtual machine, billed by Microsoft through your Azure subscription; you need no licence key. cloudimg's hourly charge on the listing is only for cloudimg's additions: applying and checking Microsoft's security baseline and cloudimg's own settings, the verifier, patching, packaging and this guide. The image contains no SQL Server, Microsoft Office or Visual Studio.
Not a certification. The hardening is Microsoft's published Windows Server 2025 Security Baseline, version 2602, as applied by cloudimg with the differences listed above, and it is checked on every build. Microsoft has not reviewed or endorsed this image, and it is not a certification by Microsoft or any other body. Review it against your own security requirements.
Microsoft and Windows Server are trademarks of the Microsoft group of companies. cloudimg is not affiliated with or endorsed by Microsoft.
Support
cloudimg's support team is on hand 24 hours a day by email (support@cloudimg.co.uk), with a guaranteed response within 24 hours, covering deployment, Remote Desktop access, the security baseline and its verifier, patching and adding roles.
- Email: support@cloudimg.co.uk
- Website: www.cloudimg.co.uk
- Product Catalogue: www.cloudimg.co.uk/products
- User Guides: www.cloudimg.co.uk/guides