The two errors indicate that the supplied key does not match the currently installed edition, version, or licensing channel, so check the exact edition and supported target before attempting activation again.^1^
1. Identify the installed edition and valid target
Open Command Prompt as Administrator and run:
DISM /online /Get-CurrentEdition
DISM /online /Get-TargetEditions
slmgr.vbs /dlv
Check these fields:
-
DISM /Get-CurrentEdition: whether the edition isServerStandard,ServerStandardEval,ServerDatacenter, or another edition. -
DISM /Get-TargetEditions: whetherServerStandardis actually listed. -
slmgr.vbs /dlv: the edition description, whetherEVALappears, and the current product-key channel.
/Get-TargetEditions is authoritative for the available conversion paths. If ServerStandard is not listed, do not repeat the failing /Set-Edition:ServerStandard command.^2^
2. Apply the matching branch
If the current edition is ServerStandardEval
First take and verify a backup of the server’s data and configuration, and ensure that a rollback or recovery plan is available. Edition conversion requires a restart.
If ServerStandard appears under /Get-TargetEditions, use a genuine Windows Server 2022 Standard retail, MAK, or qualifying OEM key:
DISM /online /Set-Edition:ServerStandard ^
/ProductKey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX /AcceptEula
Restart when prompted, then check activation:
slmgr.vbs /ato
slmgr.vbs /dlv
There is an important Core installation restriction: Standard Core Evaluation cannot be converted to retail Standard Core. If ServerStandard is absent from the target list, a fresh installation of the required non-evaluation edition is necessary.^2^
If this server is an Active Directory domain controller, Microsoft does not support converting an evaluation domain controller directly. Deploy another retail-licensed domain controller, verify replication, DNS and Global Catalog coverage, transfer the FSMO roles, and confirm a tested system-state backup before demoting the evaluation server.^2^
If the current edition is already ServerStandard
Do not use /Set-Edition; no edition conversion is needed. The failure from slmgr /ipk means the key still does not match the installed release/edition/channel or is otherwise unsuitable.
Verify the key through the organization or vendor that supplied it. The prefix PYXFW alone is insufficient to establish that it is a Windows Server 2022 Standard retail, OEM, MAK, KMS-host, or KMS-client key. For volume licensing, obtain the assigned key from the Product Keys section for the applicable volume licensing agreement, or contact the Microsoft Activation Center.^3^
After obtaining a confirmed matching key:
slmgr.vbs /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
slmgr.vbs /ato
slmgr.vbs /dlv
The expected result is “Installed product key successfully”, followed by License Status: Licensed.
If the current edition is Datacenter
A Server Standard key cannot activate Datacenter, and evaluation Datacenter cannot be converted to Standard. Use a matching Server 2022 Datacenter key or perform a fresh installation of Server 2022 Standard.^2^
A fresh installation can erase applications, configuration, roles, and data. Create and verify a complete backup and recovery plan before proceeding.
If this server should activate through KMS
Only use this branch if the organization has a functioning KMS host. After the system is a non-evaluation Server 2022 Standard installation, install Microsoft’s Server 2022 Standard GVLK and activate:
slmgr.vbs /ipk VDYBN-27WPP-V4HQT-9VMD4-VMK7H
slmgr.vbs /ato
slmgr.vbs /dlv
That GVLK does not provide a license and cannot convert an Evaluation installation. It works only with a valid KMS host or Active Directory-based activation; it cannot activate directly against Microsoft as a retail key.^4^
If a confirmed matching MAK/OEM/retail key is still rejected after the edition is non-evaluation and correct, contact the key supplier or Microsoft Activation Center for key validation rather than repairing the licensing store or reinstalling immediately.
References