Ws
Operating Systems Azure

Windows Server 2022 Datacenter on Azure User Guide

| Product: Windows Server 2022 Datacenter on Azure

Overview

This guide covers the deployment and use of Windows Server 2022 Datacenter on Microsoft Azure, using cloudimg's virtual machine image from the Azure Marketplace.

The image is Microsoft Windows Server 2022 Datacenter with the Desktop Experience (the full graphical interface), Gen2, x64, in English (en-US), built from Microsoft's own Windows Server 2022 Datacenter Gen2 image on the Azure Marketplace (MicrosoftWindowsServer:WindowsServer:2022-datacenter-g2, version 20348.5773.261025, with Microsoft's October 2026 cumulative update). cloudimg ran Windows Update and Microsoft Update until nothing was pending, which installed Microsoft's November 2026 cumulative update, removed the .NET 6 Windows Server Hosting bundle that Microsoft's image carries (.NET 6 reached the end of Microsoft's support on 12 November 2024) with its own uninstaller, and updated Microsoft Edge to the current Stable release, then generalized it with Sysprep and captured it on 1 December 2026.

cloudimg adds no server software of its own. You get Microsoft's Windows Server, fully patched on the day of capture, checked on two fresh virtual machines before release, with this guide and cloudimg's support.

What's included:

  • Windows Server 2022 Datacenter, Desktop Experience, version 21H2, build 20348.5870
  • Microsoft's November 2026 cumulative update (KB5131090, installed with KB5131089). Windows Update and Microsoft Update reported nothing pending when the image was captured on 1 December 2026
  • Microsoft Edge 158 (the current Stable release when the image was captured); no end-of-life .NET runtime. Install the supported .NET you need from Microsoft (dotnet.microsoft.com)
  • The Windows Server licence, included and activated through Azure: no product key to enter
  • Microsoft Defender Antivirus with real-time protection on, and Windows Firewall on for every profile
  • Remote Desktop (TCP 3389) as the way in. OpenSSH Server is not installed, as on Microsoft's own Windows Server 2022 image; Step 6 shows how to add it
  • The Azure VM agent, so Azure features such as Reset password, Run command and extensions work
  • Gen2 with Trusted Launch (Secure Boot and vTPM) and NVMe disk controller support, so it runs on current sizes such as Standard_D2s_v6 as well as on SCSI sizes such as the B and Dv5 series
  • 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 5).

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.

Server Manager's Local Server page on a fresh VM from this image: Windows Server 2022 Datacenter, Microsoft Defender Firewall and Antivirus on, Remote Desktop enabled, the product activated

Prerequisites

  1. An Azure subscription
  2. A Remote Desktop client: Remote Desktop Connection (mstsc) on Windows, Windows App (formerly Microsoft Remote Desktop) on macOS, or Remmina on Linux
  3. 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 such as Standard_B2ms are fine for light use, and NVMe sizes such as Standard_D2s_v6 work too.

Step 1: Deploy the Virtual Machine

Option A: Azure Portal

  1. In the Azure Marketplace, search for "Windows Server 2022 Datacenter cloudimg"
  2. Select the offer and click Create
  3. Configure the basics:
  4. Subscription and Resource group: select or create
  5. Virtual machine name and Region: your choice
  6. Security type: Trusted launch virtual machines (the default) or Standard
  7. Size: Standard_D2s_v5 recommended
  8. Under Administrator account, enter a Username and a Password that you choose. Azure refuses reserved names such as "administrator", "admin" and "guest", and asks for a password of at least 12 characters
  9. Under Inbound port rules, allow RDP (3389). Azure then opens port 3389 to the whole internet, so restrict it straight after deployment (step 7)
  10. Click Review + create, then Create
  11. 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. This image locks an account for 10 minutes after 10 bad password attempts, administrator included, so password-guessing bots on an open port 3389 can keep your administrator locked out. 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-2022:default:latest

az vm create \
  --resource-group myResourceGroup \
  --name my-ws2022 \
  --image cloudimg1647283583153:windows-server-2022: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-ws2022NSG \
  --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-ws2022 --show-details --query publicIps -o tsv

Step 2: Connect with Remote Desktop

  1. Open your Remote Desktop client and connect to the VM's public IP address
  2. Windows: run mstsc, enter the IP address and click Connect
  3. macOS: in Windows App, add a PC with the IP address
  4. Linux: in Remmina, create an RDP connection to the IP address
  5. 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
  6. Accept the certificate warning: the VM uses its own self-signed Remote Desktop certificate, made on the VM's first boot

Network Level Authentication is required, as on Microsoft's own image (every current Windows, macOS and Remmina client supports it). The desktop appears about a minute after the VM starts, and Server Manager opens by itself at sign-in.

Step 3: Check the patch level and activation

Open PowerShell (right-click the Start button, then Windows PowerShell (Admin)) and run:

Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion' | Select-Object EditionID, InstallationType, DisplayVersion, CurrentBuild, UBR | Format-List
Get-HotFix | Sort-Object InstalledOn -Descending | Select-Object -First 3 | Format-Table

On a fresh VM from this image the output is:

EditionID        : ServerDatacenter
InstallationType : Server
DisplayVersion   : 21H2
CurrentBuild     : 20348
UBR              : 5870

Source        Description      HotFixID      InstalledBy          InstalledOn
------        -----------      --------      -----------          -----------
my-ws2022     Security Update  KB5131089     NT AUTHORITY\SYSTEM  12/1/2026 12:00:00 AM
my-ws2022     Security Update  KB5131090     NT AUTHORITY\SYSTEM  12/1/2026 12:00:00 AM
my-ws2022     Update           KB5127687                          10/25/2026 12:00:00 AM

InstallationType reads Server, the Desktop Experience. The build reads 20348.5870, or higher once you have installed later updates.

Windows activates itself against Azure's Key Management Service a few minutes after the VM first starts. Check it with:

Get-CimInstance SoftwareLicensingProduct -Filter "PartialProductKey IS NOT NULL AND Name LIKE 'Windows%'" | Select-Object Name, LicenseStatus
Name                                 LicenseStatus
----                                 -------------
Windows(R), ServerDatacenter edition             1

LicenseStatus 1 means licensed. If it still reads 5 in the first few minutes, wait and run it again (see Troubleshooting).

The services that matter on a fresh VM:

Get-Service TermService, WindowsAzureGuestAgent, RdAgent | Select-Object Name, Status, StartType
Name                    Status StartType
----                    ------ ---------
RdAgent                Running Automatic
TermService            Running    Manual
WindowsAzureGuestAgent Running Automatic

Windows Security shows Microsoft Defender Antivirus on, with no threats, and Windows Defender Firewall is on for the Domain, Private and Public profiles, blocking inbound connections that no rule allows:

Windows Security on a fresh VM: Virus and threat protection with no current threats

Windows Defender Firewall with Advanced Security on a fresh VM: the firewall on for the Domain, Private and Public profiles, inbound connections that do not match a rule blocked

Step 4: Keeping Windows patched

Windows Update reported nothing pending when the image was captured on 1 December 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. Windows Server 2022 is in Microsoft's extended support, which provides security updates until 14 October 2031; mainstream support ended on 13 October 2026.

Settings > Windows Update on a fresh VM: You're up to date

Windows restarts to finish some updates. To control when that happens, set your active hours in Windows Update, or manage patching and its maintenance window with Azure Update Manager.

Step 5: Adding roles and opening ports

Install roles and features as usual, for example IIS:

Install-WindowsFeature -Name Web-Server -IncludeManagementTools
Success Restart Needed Exit Code      Feature Result
------- -------------- ---------      --------------
True    No             Success        {Common HTTP Features, Default Document, D...

Inbound traffic is blocked by default, so a service that listens for connections needs a Windows Firewall rule as well as a Network Security Group rule. Some roles add their own firewall rules when installed. To add one yourself:

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.

Step 6: Adding SSH

OpenSSH Server is not installed, so Remote Desktop is the only way in until you choose otherwise. To use SSH, add Windows' OpenSSH Server capability (it downloads from Windows Update):

Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
Path          :
Online        : True
RestartNeeded : False

Installing it adds and enables Windows' firewall rule for it (OpenSSH-Server-In-TCP, TCP 22). Start the service and set it to start with Windows:

Set-Service sshd -StartupType Automatic
Start-Service sshd
Get-Service sshd | Select-Object Name, Status, StartType
Name  Status StartType
----  ------ ---------
sshd Running Automatic

Then allow TCP 22 in the Network Security Group from your own address only, and connect with ssh <your-admin-name>@<vm-public-ip>.

Common Use Cases

  • Application, web and file servers on IIS, .NET and Windows services
  • Active Directory domain controllers, DNS and DHCP servers in an Azure virtual network
  • Jump hosts and management servers reached over Remote Desktop or Azure Bastion
  • A clean, patched starting point for your own golden images

Troubleshooting

Windows shows as not activated

Activation happens a few minutes after the VM's first start, through Azure's Key Management Service (azkms.core.windows.net, TCP 1688). Azure's activation service now and then refuses a VM's first request, and Windows otherwise waits two hours before it tries again. If LicenseStatus still reads 5 after 15 minutes, check that the VM can reach that address (a custom route, firewall or proxy that blocks outbound TCP 1688 stops activation), then restart the VM: Windows activates as it starts, and LicenseStatus reads 1 a few minutes later.

"The referenced account is currently locked out"

Ten bad password attempts lock the account, administrator included, for 10 minutes. Wait 10 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, and enter your administrator user name and a new password. The same from the Azure CLI:

az vm user update --resource-group myResourceGroup --name my-ws2022 --username <your-admin-name> --password '<new-password>'

Password expiry

Windows' 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 change it in Local Security Policy > Account Policies > Password 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

  1. Verify the VM is Running in the Azure portal
  2. 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
  3. Sign in as <vm-name>\<your-admin-name> with a client that supports Network Level Authentication
  4. 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 TermService

A service you installed cannot be reached

Check the Windows Firewall rule (Step 5) 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 covers cloudimg's work: patching, checking and packaging the image, this guide and support. The image contains no SQL Server, Microsoft Office or Visual Studio.

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, activation, patching and adding roles.