Short answer: To activate Windows Server 2022, install a key that matches your edition and then activate from an elevated prompt. Volume-licensed servers activate through a KMS host or Active Directory. Hyper-V guests on a Datacenter host can use AVMA keys. We'd convert an evaluation install with DISM first.
To activate Windows Server 2022, install a product key that matches the edition and channel you deployed. The server then contacts Microsoft, or your own activation service. A single machine with a retail key needs two commands, which we show below.
For fleets we have three more routes: KMS, Active Directory-based activation and AVMA for Hyper-V guests.
- Retail or OEM key: two
slmgrcommands, or Settings, Activation. - Evaluation copy: convert the edition with DISM first, then enter the key.
- KMS: the generic client key and a KMS host on the network.
- Active Directory-based activation: domain-joined servers activate against the forest.
- AVMA: virtual machines activate through a Datacenter host.

Not installed yet? Start with how to install Windows Server 2022.
| Route | Who it’s for |
|---|---|
| Retail, OEM or MAK key | A single server with internet access |
| KMS | Fleets with a KMS host on the network |
| Active Directory-based activation | Domain-joined servers |
| AVMA | Hyper-V guests on a Datacenter host |
This page goes through each route from a sysadmin’s point of view.
The right method depends on three things.
- The edition, Standard or Datacenter.
- The license channel: retail, OEM or volume.
- The machine itself, a physical host or a VM.
| Point | Detail |
|---|---|
| Edition and channel | The key must match both. A Standard key will not activate Datacenter, and a retail key will not activate an evaluation install until you convert it with DISM |
| Retail and MAK keys | slmgr /ipk, then slmgr /ato |
| KMS clients | Use the public GVLK and a KMS host on TCP 1688 |
| AVMA | Activates 2022 guests on an activated Windows Server 2022 or 2025 Datacenter Hyper-V host, with no internet needed inside the VM |
Windows Server 2022 editions and licensing
The system ships in three main editions, plus the smaller Essentials. Each key is tied to one edition and one license channel.
Check before activating, with either line below.
DISM /Online /Get-CurrentEdition
slmgr /dlv
A mismatch is the single most common reason activation fails with a perfectly valid key.
Standard covers a physical host plus two virtual machines per fully licensed server. Microsoft calls those two OSEs.
Datacenter removes the VM limit and adds more.
- Storage Spaces Direct
- Software-Defined Networking
- Shielded VMs
- Unlimited Storage Replica
Both editions are licensed per physical core. The minimum is 8 core licenses per processor and 16 per server, even on a smaller box.
| Edition | Virtualization rights | Typical activation route | Can host AVMA |
|---|---|---|---|
| Windows Server 2022 Standard | 2 VMs per fully licensed server | Retail/OEM key, MAK, or KMS (GVLK) | No |
| Windows Server 2022 Datacenter | Unlimited VMs | Retail/OEM key, MAK, or KMS (GVLK) | Yes, with the Hyper-V role |
| Datacenter: Azure Edition | Unlimited, runs on Azure / Azure Local | Azure-based activation, KMS | Not applicable |
| Windows Server 2022 Essentials | 1 VM or physical, small business (25 users / 50 devices) | OEM key | No |
Our breakdown of virtual machine limits in Windows Server 2022 Standard works through the stacking math.
Preparing for Windows Server 2022 activation
You need an administrator account, a key for the installed edition and a route to the activation service.
| Key type | Route it needs |
|---|---|
| Retail and MAK keys | Internet access |
| KMS | Port 1688 to a KMS host |
| Active Directory-based activation | A reachable domain controller |
Correct system time and working DNS matter more than people think. Both break activation silently.
| Check | Detail |
|---|---|
| Hardware minimums from Microsoft | 1.4 GHz 64-bit CPU, 512 MB RAM for Server Core (2 GB for Desktop Experience), 32 GB of disk |
| A proxy in the way | Configure WinHTTP first with netsh winhttp set proxy, or online activation will time out |
| KMS planned | Confirm the host is up and that the _vlmcs._tcp SRV record exists in DNS |
| Evaluation media | A retail key cannot be entered until the edition is converted |
We’d run the detailed license view first. Its “Product Key Channel” line shows the type of install, and that decides every next step.
| Channel shown | Type of install |
|---|---|
| Retail | Retail key |
| OEM | Key from the server maker |
| Volume:GVLK | KMS client |
| Volume:MAK | Multiple activation key |
| TIMEBASED_EVAL | Evaluation |
How to activate Windows Server 2022 with a product key
With a retail, OEM or MAK key, activation takes about two minutes. The server contacts Microsoft over the internet.
- Right-click Start and choose the Admin entry of Terminal or Command Prompt.
- Install the key with the first line below, using your own 25 characters.
- Activate online with the second line.
- Check the result with the third or the fourth line.

slmgr /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
slmgr /ato
slmgr /dlv
slmgr /xpr
| Line | What it does |
|---|---|
slmgr /ipk |
Installs the key |
slmgr /ato |
Activates online |
slmgr /dlv |
Shows the details, with “License Status: Licensed” |
slmgr /xpr |
Shows “permanently activated” |
Settings and Server Manager reach the same result through a GUI.
Settings app on Desktop Experience
- Press Win+I and open Update & Security, then Activation.
- Click Change product key.
- Type the key and click Next, then Activate.
Server Manager
- Open Server Manager and select Local Server.
- Next to Product ID, click the “Not activated” link.
- Enter the key in the window that opens, and confirm.
Activation usually completes within seconds. Now and then it takes a few minutes while the licensing service syncs.
So we’d wait before running the activation line a second time.
Server Core: the SConfig activation menu
No Settings app on Server Core. No problem either.
On Windows Server 2022 SConfig opens by itself after sign-in, inside PowerShell. Closed it? Type SConfig and press Enter. Local administrator rights needed.
- Option 11, Windows activation.
- Then 3 to add a new product key.
- Then 2 to activate with the installed key.
- And 1 shows the current status.
One catch from Microsoft’s own SConfig notes: it doesn’t run in a remote PowerShell session. Signed in locally or over Remote Desktop, it works.
Windows Server 2022 activation from cmd on another server
Got a handful of servers and no wish to log on to each? slmgr takes a computer name, plus an account with admin rights there.
slmgr.vbs SRV02 CONTOSO\admin <password> /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
slmgr.vbs SRV02 CONTOSO\admin <password> /ato
Swap in your own server name, account and key. Dozens of machines? Then we’d move to VAMT, the Volume Activation Management Tool, which Microsoft points to for managing remote clients. The full option list lives in our slmgr commands guide.
Offline activation, which used to be phone activation
Isolated network? A retail or MAK key still works there. The phone line is gone, though. Microsoft moved telephone activation online, to the Product Activation portal at aka.ms/aoh, also reachable as visualsupport.microsoft.com. Calling the old number won’t finish it.
| Where | Command | What it does |
|---|---|---|
| Any server, step 1 | slmgr /dti |
Prints the installation ID. Open the Product Activation portal on any device with internet, pass the CAPTCHA, sign in, choose Activate a Microsoft Product and follow its steps |
| Any server, step 2 | slmgr /atp <confirmation ID> |
Applies the answer |
The sign-in only protects the portal. Microsoft says it doesn’t tie your account to the license.
Which edition the key has to match is settled in Windows Server 2022 Standard vs Datacenter, and the clean installation itself in how to install Windows Server 2022.
Activating licensed Windows Server 2022 Standard and Datacenter
Installed from full media, not a trial? Then the route depends on two things. The edition, and where the key came from.
| Edition | Usual activation route | Worth knowing |
|---|---|---|
| Standard | Retail, OEM or MAK key, or a KMS host on your network | Can be an AVMA guest only when the Hyper-V host runs activated Datacenter |
| Datacenter | The same key routes as Standard | Can serve as a KMS host, and its Hyper-V host activates AVMA guests |
| Datacenter: Azure Edition | Activated by Azure | Can’t be configured as a KMS host |
Not sure which channel the server is on? One line answers it:
slmgr /dlv
Read the Description line. RETAIL, OEM or VOLUME_MAK there? That’s a key somebody typed in. VOLUME_KMSCLIENT? Then the server sits waiting for a KMS host, and a product key from a shop isn’t what it needs yet.
OEM servers usually arrive activated. That license stays with the hardware it shipped on, so we wouldn’t plan to move it to a new box.
Edition and key have to match. A Standard key on Datacenter fails, and so does the reverse. Check the edition name in Settings or in Server Manager before you paste anything.
Moving a working server from MAK to retail, or from KMS to a retail key? Same edition, same slmgr lines as above. No reinstall.
Desktop watermark still says Evaluation? Different job. Our guide to converting Windows Server 2022 evaluation to Standard covers the edition change, the reboots and the conversion paths.
Edition IDs for other releases sit in our page on activating Windows Server via DISM.
KMS activation for Windows Server 2022
Key Management Service lets clients activate against a host on your own network. Microsoft isn’t contacted by each client.
| Fact | Detail |
|---|---|
| Host key | A KMS host key (CSVLK) from the Microsoft 365 admin center. The host is activated once with it |
| Client key | The public GVLK |
| Renewal | Clients renew every seven days |
| Threshold | A server KMS host starts activating after it has seen five requests |
| Validity | Each activation is valid for 180 days |
Setting up the KMS host
- Install the Volume Activation Services role with the line below.
- Open Volume Activation Tools, choose Key Management Service and enter your CSVLK.
- Let the wizard publish the
_vlmcs._tcpSRV record in DNS, or create it manually. - Open inbound TCP 1688 in Windows Firewall.
Install-WindowsFeature -Name VolumeActivation -IncludeManagementTools
Pointing clients at it
Volume-licensed media already contains the GVLK. A server coming from MAK or retail needs the generic key first.
It’s in Microsoft’s KMS client activation keys list.
| Edition | KMS client key (GVLK) | Copy |
|---|---|---|
| Windows Server 2022 Standard | VDYBN-27WPP-V4HQT-9VMD4-VMK7H | |
| Windows Server 2022 Datacenter | WX4NM-KYWYW-QJJR4-XV3QB-6VM33 | |
| Windows Server 2022 Datacenter: Azure Edition | NTBV8-9K7Q8-V27C6-M2BTV-KHMXV |
slmgr /ipk <GVLK>
slmgr /skms kms01.contoso.local:1688
slmgr /ato
The second line is optional, for when DNS discovery fails.
These keys are public and do nothing by themselves. Without a KMS host on your network, a GVLK leaves the server unactivated.
That’s exactly why “free” Server keys posted online never work at home.
Active Directory-based activation for Windows Server 2022
ADBA stores an activation object in the domain. Domain-joined servers then activate at startup, with no KMS host to find and no five-request threshold.
We’d use it when every server is domain-joined and the AD schema is at the Windows Server 2012 level or newer.
Workgroup machines and DMZ hosts still need KMS, MAK or retail keys.
- Install the Volume Activation Services role on any domain member. A domain controller works too.
- In Volume Activation Tools, choose Active Directory-Based Activation.
- Enter the CSVLK and give the activation object a name.
- Restart a test server and check the detailed license view. It should report activation through Active Directory.
ADBA rarely needs tuning after that. Clients revalidate against AD every 180 days.
Adding a server to the domain is all it takes to license it. So it tends to replace KMS in AD-only shops.
Activating Windows Server 2022 guests with AVMA
Automatic Virtual Machine Activation lets guests activate against an activated Datacenter Hyper-V host. The VM needs no internet and no KMS.
A Datacenter host on this release or on 2025 activates guests of any edition.
Install the AVMA key in the guest and keep the Data Exchange integration service on. It then activates at boot.
| Guest edition | AVMA key (Windows Server 2022) | Copy |
|---|---|---|
| Datacenter | W3GNR-8DDXR-2TFRP-H8P33-DV9BG | |
| Datacenter: Azure Edition | F7TB6-YKN8Y-FCC6R-KQ484-VMK3J | |
| Standard | YDFWN-MJ9JR-3DYRK-FXXRW-78VHK |
The old version of this page listed AVMA keys for the 2016 and 2019 releases. Those don’t activate 2022 guests.
The current list lives in Microsoft’s AVMA documentation.
- In a failover cluster, every node has to be activated. Otherwise guests lose activation after a live migration.
- AVMA works only on Hyper-V. Other hypervisors, such as VMware or Proxmox, need regular keys or KMS.
- Requests are logged as Event ID 12310 on the host and 12309 in the guest’s Application log.
AVMA covers activation, not licensing. You still need enough Datacenter core licenses for the host. We’d see AVMA as a way to skip typing keys into every guest.
Windows Server 2022 activation errors
Most activation failures come from four causes.
- A key for a different edition or channel.
- A volume install looking for a KMS host that doesn’t exist.
- No route to Microsoft’s servers.
- A wrong system clock.
The error code tells you which one. So we’d read it before reinstalling anything.
| Error | What it usually points to | Fix |
|---|---|---|
| 0x8007232B (DNS name does not exist) | Volume media is searching for a KMS host and DNS has no SRV record | Install a retail/MAK key, or set the host with slmgr /skms |
| 0x8007007B (syntax incorrect) | Same KMS discovery problem, or a key typed with wrong characters | Check DNS for _vlmcs._tcp, retype the key |
| 0xC004F074 (no KMS could be contacted) | KMS host unreachable, port 1688 blocked, or clocks out of sync | Test the port, sync time, see our guide to error 0xC004F074 |
| 0xC004F050 (invalid product key) | Key for another edition or version (for example a 2019 key on 2022) | Verify with DISM /Online /Get-CurrentEdition |
| 0xC004F069 / key not accepted on eval | Evaluation edition rejects retail keys | Convert the edition first, see evaluation to Standard |
| 0xC004C008 (activation limit) | The key has been used on too many machines | Use the Product Activation portal at aka.ms/aoh, or contact the seller |
The order that saves the most time: check the edition, the channel, DNS and the clock, and then retry activation.
If a key bought from HypestKey doesn’t activate after those checks, write to support@hypestkey.com. We help you fix it or send a replacement.
Checking Windows Server 2022 activation status
Check on the server with the detailed license view or the expiry view. PowerShell can query many servers at once.
Get-CimInstance SoftwareLicensingProduct | Where-Object PartialProductKey | Select-Object Name, LicenseStatus
That line lists every licensed product and its status, where 1 stands for licensed. Want a different way to read it? Settings, slmgr and more sit in how to check Windows activation status.
| Activation type | How long it lasts |
|---|---|
| Retail or MAK | Permanent, unless the hardware changes a lot |
| KMS and ADBA | 180 days, renewed in the background. Connectivity to the host or a domain controller has to stay in place |
- Document the key and method each server uses, because auditors ask for it.
- OEM keys stay with the server they came with.
- Retail licenses can move after you remove them from the old hardware.
- Volume licenses can be reassigned, though not more often than every 90 days. Permanent hardware failure is the exception.
- Remember the CALs. Activation covers the server, while each user or device that connects still needs a Windows Server CAL.
- Remote Desktop users need RDS CALs. Our page on managing CAL licenses in Windows Server 2022 explains both.
- After a move to different hardware, a KMS or AVMA guest typically reactivates by itself. A retail-activated server may ask for the activation line again.
For the KMS route we keep the generic client keys of every edition in Windows Server KMS keys. The client access licenses that come next are compared in RDS CAL Per User vs Per Device, and we explain the base CALs in managing CAL licenses in Windows Server 2022.
Quick answers
| Question | Short answer |
|---|---|
| How do you activate Windows Server 2022 from the command line? | Open an elevated Command Prompt. |
| Can you activate Windows Server 2022 Datacenter with a Standard key? | No. |
| Why does my retail key fail on the evaluation version? | Evaluation editions only accept a key through an edition change. |
| Do the KMS client keys published by Microsoft activate Windows Server 2022 for free? | No. |
| What happens if Windows Server 2022 is never activated? | The server keeps running, but it shows activation notices and locks personalization settings. |
| The activation phone number doesn’t work any more. How do I activate offline? | Through the Product Activation portal. |
| Server Core has no Settings app. Where do I enter the key? | In SConfig. |
Common Windows Server 2022 activation mistakes
- Entering a Standard key on a Datacenter install.
- Typing a retail key into an evaluation copy before converting it.
- Expecting a public GVLK to activate a server with no KMS host.
- Running the activation line again and again while the service is still syncing.
- Using AVMA keys from an older version on 2022 guests.
- Leaving one cluster node unactivated.
- Ignoring the clock and DNS when the error mentions KMS.
- Trying to convert an evaluation domain controller.
- Treating activation as the whole license and forgetting CALs.
Terms used on this page
| Term | Meaning |
|---|---|
| Channel | The way a license is sold: retail, OEM or volume |
| MAK | Multiple Activation Key, a volume key that activates with Microsoft |
| KMS | Key Management Service, a host on your network that activates clients |
| GVLK | Generic Volume License Key, the public key a KMS client carries |
| CSVLK | The KMS host key from your volume license |
| ADBA | Active Directory-based activation |
| AVMA | Automatic Virtual Machine Activation for Hyper-V guests |
| OSE | Operating system environment, physical or virtual |
| Evaluation edition | A 180-day trial install that needs an edition change before it takes a key |
| Installation ID | The code the server prints for offline activation through the Product Activation portal |
| Confirmation ID | The code you get back from the portal and apply with slmgr /atp |
| CAL | Client Access License, for each user or device that connects |
FAQ
How do I activate Windows Server 2022 from the command line?
Open an elevated Command Prompt. Install your 25-character key with slmgr and its /ipk switch, then activate with /ato. We'd check the result with /dlv, where the License Status line should read Licensed.
Can I activate Windows Server 2022 Datacenter with a Standard key?
No. Each key matches one edition. DISM can upgrade a Standard install to Datacenter when you supply a Datacenter key. A Standard key never activates Datacenter, so we'd check the edition first.
Why does my retail key fail on the evaluation version?
Evaluation editions only accept a key through an edition change. Run the DISM edition change with your key and accept the license terms. After the reboot, we'd expect the server to activate as a full Standard install.
Do the KMS client keys published by Microsoft activate Windows Server 2022 for free?
No. A GVLK only tells the server to look for a KMS host on your network. That host has to be activated under a paid volume license. Without one, the server stays unactivated, so we wouldn't count on those keys.
What happens if Windows Server 2022 is never activated?
The server keeps running, but it shows activation notices and locks personalization settings. You're also out of license compliance. Evaluation installs are stricter, and we'd watch the clock there. After 180 days they shut down every hour.
The activation phone number doesn't work any more. How do I activate offline?
Through the Product Activation portal. Microsoft moved telephone activation online, to aka.ms/aoh. Print the installation ID with slmgr /dti, open the portal on any device with internet and follow its steps. The confirmation ID goes back in with /atp.
Server Core has no Settings app. Where do I enter the key?
In SConfig. It opens by itself after sign-in on Windows Server 2022. Option 11 is Windows activation: 3 adds a key, 2 activates, 1 shows the status. The slmgr lines work on Server Core too.
