---
title: WindowsLicensing CSP
description: Learn more about the WindowsLicensing CSP.
ms.date: 08/06/2024
---
# WindowsLicensing CSP
[!INCLUDE [Windows Insider tip](includes/mdm-insider-csp-note.md)]
The WindowsLicensing configuration service provider is designed for licensing related management scenarios.
The following list shows the WindowsLicensing configuration service provider nodes:
- ./Vendor/MSFT/WindowsLicensing
- [ChangeProductKey](#changeproductkey)
- [CheckApplicability](#checkapplicability)
- [DeviceLicensingService](#devicelicensingservice)
- [DeviceLicensingLastError](#devicelicensingservicedevicelicensinglasterror)
- [DeviceLicensingLastErrorDescription](#devicelicensingservicedevicelicensinglasterrordescription)
- [DeviceLicensingStatus](#devicelicensingservicedevicelicensingstatus)
- [LicenseType](#devicelicensingservicelicensetype)
- [Edition](#edition)
- [LicenseKeyType](#licensekeytype)
- [SMode](#smode)
- [Status](#smodestatus)
- [SwitchFromSMode](#smodeswitchfromsmode)
- [SwitchingPolicy](#smodeswitchingpolicy)
- [Status](#status)
- [Subscriptions](#subscriptions)
- [{SubscriptionId}](#subscriptionssubscriptionid)
- [Name](#subscriptionssubscriptionidname)
- [Status](#subscriptionssubscriptionidstatus)
- [DisableSubscription](#subscriptionsdisablesubscription)
- [RemoveSubscription](#subscriptionsremovesubscription)
- [SubscriptionLastError](#subscriptionssubscriptionlasterror)
- [SubscriptionLastErrorDescription](#subscriptionssubscriptionlasterrordescription)
- [SubscriptionStatus](#subscriptionssubscriptionstatus)
- [SubscriptionType](#subscriptionssubscriptiontype)
- [UpgradeEditionWithLicense](#upgradeeditionwithlicense)
- [UpgradeEditionWithProductKey](#upgradeeditionwithproductkey)
## ChangeProductKey
| Scope | Editions | Applicable OS |
|:--|:--|:--|
| ✅ Device
❌ User | ✅ Pro
✅ Enterprise
✅ Education
❌ Windows SE
✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows 10, version 1703 [10.0.15063] and later |
```Device
./Vendor/MSFT/WindowsLicensing/ChangeProductKey
```
Installs a product key for Windows 10 desktop devices. Does not reboot.
**Description framework properties**:
| Property name | Property value |
|:--|:--|
| Format | `chr` (string) |
| Access Type | Exec |
## CheckApplicability
| Scope | Editions | Applicable OS |
|:--|:--|:--|
| ✅ Device
❌ User | ✅ Pro
✅ Enterprise
✅ Education
❌ Windows SE
✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows 10, version 1511 [10.0.10586] and later |
```Device
./Vendor/MSFT/WindowsLicensing/CheckApplicability
```
Returns TRUE if the entered product key can be used for an edition upgrade of Windows 10 desktop devices.
**Description framework properties**:
| Property name | Property value |
|:--|:--|
| Format | `chr` (string) |
| Access Type | Exec |
**Example**:
```xml
$CmdID$
-
./Device/Vendor/MSFT/WindowsLicensing/CheckApplicability
chr
XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
```
> [!NOTE]
> `XXXXX-XXXXX-XXXXX-XXXXX-XXXXX` in the Data tag should be replaced with your product key.
## DeviceLicensingService
| Scope | Editions | Applicable OS |
|:--|:--|:--|
| ✅ Device
❌ User | ✅ Pro
✅ Enterprise
✅ Education
❌ Windows SE
✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows 11, version 21H2 with [KB5018483](https://support.microsoft.com/help/5018483) [10.0.22000.1165] and later
✅ Windows 11, version 22H2 [10.0.22621] and later |
```Device
./Vendor/MSFT/WindowsLicensing/DeviceLicensingService
```
Device Based Subscription.
**Description framework properties**:
| Property name | Property value |
|:--|:--|
| Format | `node` |
| Access Type | Get |
### DeviceLicensingService/DeviceLicensingLastError
| Scope | Editions | Applicable OS |
|:--|:--|:--|
| ✅ Device
❌ User | ✅ Pro
✅ Enterprise
✅ Education
❌ Windows SE
✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows 11, version 21H2 with [KB5018483](https://support.microsoft.com/help/5018483) [10.0.22000.1165] and later
✅ Windows 11, version 22H2 [10.0.22621] and later |
```Device
./Vendor/MSFT/WindowsLicensing/DeviceLicensingService/DeviceLicensingLastError
```
Returns the last error code of Refresh/Remove Device License operation. Value would be empty(0) in absence of error.
**Description framework properties**:
| Property name | Property value |
|:--|:--|
| Format | `int` |
| Access Type | Get |
### DeviceLicensingService/DeviceLicensingLastErrorDescription
| Scope | Editions | Applicable OS |
|:--|:--|:--|
| ✅ Device
❌ User | ✅ Pro
✅ Enterprise
✅ Education
❌ Windows SE
✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows 11, version 21H2 with [KB5018483](https://support.microsoft.com/help/5018483) [10.0.22000.1165] and later
✅ Windows 11, version 22H2 [10.0.22621] and later |
```Device
./Vendor/MSFT/WindowsLicensing/DeviceLicensingService/DeviceLicensingLastErrorDescription
```
Returns last error description from Device Licensing. Value would be empty, if error decription can't be evaluated.
**Description framework properties**:
| Property name | Property value |
|:--|:--|
| Format | `chr` (string) |
| Access Type | Get |
### DeviceLicensingService/DeviceLicensingStatus
| Scope | Editions | Applicable OS |
|:--|:--|:--|
| ✅ Device
❌ User | ✅ Pro
✅ Enterprise
✅ Education
❌ Windows SE
✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows 11, version 21H2 with [KB5018483](https://support.microsoft.com/help/5018483) [10.0.22000.1165] and later
✅ Windows 11, version 22H2 [10.0.22621] and later |
```Device
./Vendor/MSFT/WindowsLicensing/DeviceLicensingService/DeviceLicensingStatus
```
Returns the status of Refresh/Remove Device License operation.
**Description framework properties**:
| Property name | Property value |
|:--|:--|
| Format | `int` |
| Access Type | Get |
### DeviceLicensingService/LicenseType
| Scope | Editions | Applicable OS |
|:--|:--|:--|
| ✅ Device
❌ User | ✅ Pro
✅ Enterprise
✅ Education
❌ Windows SE
✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows 11, version 21H2 with [KB5018483](https://support.microsoft.com/help/5018483) [10.0.22000.1165] and later
✅ Windows 11, version 22H2 [10.0.22621] and later |
```Device
./Vendor/MSFT/WindowsLicensing/DeviceLicensingService/LicenseType
```
License Type: User Based Subscription or Device Based Subscription.
**Description framework properties**:
| Property name | Property value |
|:--|:--|
| Format | `int` |
| Access Type | Get, Replace |
**Allowed values**:
| Value | Description |
|:--|:--|
| 0 | User Based Subscription. |
| 1 | Device Based Subscription. |
## Edition
| Scope | Editions | Applicable OS |
|:--|:--|:--|
| ✅ Device
❌ User | ✅ Pro
✅ Enterprise
✅ Education
❌ Windows SE
✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows 10, version 1511 [10.0.10586] and later |
```Device
./Vendor/MSFT/WindowsLicensing/Edition
```
Returns a value that maps to the Windows 10 edition running on desktop or mobile devices. Take the value, convert it into its hexadecimal equivalent and search the GetProductInfo function page on MSDN for edition information.
**Description framework properties**:
| Property name | Property value |
|:--|:--|
| Format | `int` |
| Access Type | Get |
**Example**:
```xml
$CmdID$
-
./Device/Vendor/MSFT/WindowsLicensing/Edition
```
## LicenseKeyType
| Scope | Editions | Applicable OS |
|:--|:--|:--|
| ✅ Device
❌ User | ✅ Pro
✅ Enterprise
✅ Education
❌ Windows SE
✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows 10, version 1511 [10.0.10586] and later |
```Device
./Vendor/MSFT/WindowsLicensing/LicenseKeyType
```
Returns the parameter type used by Windows 10 devices for an edition upgrade. Windows 10 desktop devices require a product key for an edition upgrade. Windows 10 mobile devices require a license for an edition upgrade.
**Description framework properties**:
| Property name | Property value |
|:--|:--|
| Format | `chr` (string) |
| Access Type | Get |
**Example**:
```xml
$CmdID$
-
./Device/Vendor/MSFT/WindowsLicensing/LicenseKeyType
```
## SMode
| Scope | Editions | Applicable OS |
|:--|:--|:--|
| ✅ Device
❌ User | ✅ Pro
✅ Enterprise
✅ Education
❌ Windows SE
✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows 10, version 1809 [10.0.17763] and later |
```Device
./Vendor/MSFT/WindowsLicensing/SMode
```
Interior node for managing S mode.
**Description framework properties**:
| Property name | Property value |
|:--|:--|
| Format | `node` |
| Access Type | Get |
### SMode/Status
| Scope | Editions | Applicable OS |
|:--|:--|:--|
| ✅ Device
❌ User | ✅ Pro
✅ Enterprise
✅ Education
❌ Windows SE
✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows 10, version 1809 [10.0.17763] and later |
```Device
./Vendor/MSFT/WindowsLicensing/SMode/Status
```
Returns the status of the latest SwitchFromSMode or SwitchingPolicy set request.
Possible values:
- Request fails with error code 404: no SwitchFromSMode request has been made.
- 0: The device successfully switched out of S mode.
- 1: The device is processing the request to switch out of S mode.
- 3: The device was already switched out of S mode.
- 4: The device failed to switch out of S mode.
**Description framework properties**:
| Property name | Property value |
|:--|:--|
| Format | `int` |
| Access Type | Get |
**Example**:
```xml
6
-
./Vendor/MSFT/WindowsLicensing/SMode/Status
```
### SMode/SwitchFromSMode
| Scope | Editions | Applicable OS |
|:--|:--|:--|
| ✅ Device
❌ User | ✅ Pro
✅ Enterprise
✅ Education
❌ Windows SE
✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows 10, version 1809 [10.0.17763] and later |
```Device
./Vendor/MSFT/WindowsLicensing/SMode/SwitchFromSMode
```
Switches a device out of S mode if possible. Does not reboot.
**Description framework properties**:
| Property name | Property value |
|:--|:--|
| Format | `null` |
| Access Type | Exec |
**Example**:
```xml
5
-
./Vendor/MSFT/WindowsLicensing/SMode/SwitchFromSMode
null
text/plain
```
### SMode/SwitchingPolicy
| Scope | Editions | Applicable OS |
|:--|:--|:--|
| ✅ Device
❌ User | ✅ Pro
✅ Enterprise
✅ Education
❌ Windows SE
✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows 10, version 1809 [10.0.17763] and later |
```Device
./Vendor/MSFT/WindowsLicensing/SMode/SwitchingPolicy
```
Policy that determines whether a consumer can switch the device out of S mode.
This setting is only applicable to devices available in S mode.
**Description framework properties**:
| Property name | Property value |
|:--|:--|
| Format | `int` |
| Access Type | Add, Delete, Get, Replace |
**Allowed values**:
| Value | Description |
|:--|:--|
| 0 | No Restriction: The user is allowed to switch the device out of S mode. |
| 1 | User Blocked: The admin has blocked the user from switching their device out of S mode. Only the admin can switch the device out of S mode through the SMode/SwitchFromSMode node. |
**Examples**:
- Add S Mode SwitchingPolicy
```xml
4
-
./Vendor/MSFT/WindowsLicensing/SMode/SwitchingPolicy
int
text/plain
1
```
- Get S Mode Switching Policy
```xml
2
-
./Vendor/MSFT/WindowsLicensing/SMode/SwitchingPolicy
```
- Replace S mode SwitchingPolicy
```xml
1
-
./Vendor/MSFT/WindowsLicensing/SMode/SwitchingPolicy
int
text/plain
1
```
- Delete S mode SwitchingPolicy
```xml
3
-
./Vendor/MSFT/WindowsLicensing/SMode/SwitchingPolicy
```
## Status
| Scope | Editions | Applicable OS |
|:--|:--|:--|
| ✅ Device
❌ User | ✅ Pro
✅ Enterprise
✅ Education
❌ Windows SE
✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows 10, version 1511 [10.0.10586] and later |
```Device
./Vendor/MSFT/WindowsLicensing/Status
```
Returns the status of an edition upgrade on Windows 10 desktop and mobile devices. Status: 0 = Failed, 1 = Pending, 2 = In progress, 3 = Completed, 4 = Unknown.
**Description framework properties**:
| Property name | Property value |
|:--|:--|
| Format | `int` |
| Access Type | Get |
**Example**:
```xml
$CmdID$
-
./Device/Vendor/MSFT/WindowsLicensing/Status
```
## Subscriptions
| Scope | Editions | Applicable OS |
|:--|:--|:--|
| ✅ Device
❌ User | ✅ Pro
✅ Enterprise
✅ Education
❌ Windows SE
✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows 10, version 1607 [10.0.14393] and later |
```Device
./Vendor/MSFT/WindowsLicensing/Subscriptions
```
Node for subscriptions.
**Description framework properties**:
| Property name | Property value |
|:--|:--|
| Format | `node` |
| Access Type | Get |
### Subscriptions/{SubscriptionId}
| Scope | Editions | Applicable OS |
|:--|:--|:--|
| ✅ Device
❌ User | ✅ Pro
✅ Enterprise
✅ Education
❌ Windows SE
✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows 10, version 1607 [10.0.14393] and later |
```Device
./Vendor/MSFT/WindowsLicensing/Subscriptions/{SubscriptionId}
```
Node for subscription IDs.
**Description framework properties**:
| Property name | Property value |
|:--|:--|
| Format | `node` |
| Access Type | Get |
| Dynamic Node Naming | ClientInventory |
#### Subscriptions/{SubscriptionId}/Name
| Scope | Editions | Applicable OS |
|:--|:--|:--|
| ✅ Device
❌ User | ✅ Pro
✅ Enterprise
✅ Education
❌ Windows SE
✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows 10, version 1607 [10.0.14393] and later |
```Device
./Vendor/MSFT/WindowsLicensing/Subscriptions/{SubscriptionId}/Name
```
Returns the name of the subscription.
**Description framework properties**:
| Property name | Property value |
|:--|:--|
| Format | `chr` (string) |
| Access Type | Get |
#### Subscriptions/{SubscriptionId}/Status
| Scope | Editions | Applicable OS |
|:--|:--|:--|
| ✅ Device
❌ User | ✅ Pro
✅ Enterprise
✅ Education
❌ Windows SE
✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows 10, version 1607 [10.0.14393] and later |
```Device
./Vendor/MSFT/WindowsLicensing/Subscriptions/{SubscriptionId}/Status
```
Returns the status of the subscription.
**Description framework properties**:
| Property name | Property value |
|:--|:--|
| Format | `int` |
| Access Type | Get |
### Subscriptions/DisableSubscription
| Scope | Editions | Applicable OS |
|:--|:--|:--|
| ✅ Device
❌ User | ✅ Pro
✅ Enterprise
✅ Education
❌ Windows SE
✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows Insider Preview |
```Device
./Vendor/MSFT/WindowsLicensing/Subscriptions/DisableSubscription
```
Disable or Enable subscription activation on a device.
**Description framework properties**:
| Property name | Property value |
|:--|:--|
| Format | `int` |
| Access Type | Replace |
**Allowed values**:
| Value | Description |
|:--|:--|
| 0 | Enable Subscription. |
| 1 | Disable Subscription. It also removes any existing subscription on the device. |
### Subscriptions/RemoveSubscription
| Scope | Editions | Applicable OS |
|:--|:--|:--|
| ✅ Device
❌ User | ✅ Pro
✅ Enterprise
✅ Education
❌ Windows SE
✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows Insider Preview |
```Device
./Vendor/MSFT/WindowsLicensing/Subscriptions/RemoveSubscription
```
Remove subscription uninstall subscription license. It also reset subscription type to User Based Subscription.
**Description framework properties**:
| Property name | Property value |
|:--|:--|
| Format | `null` |
| Access Type | Exec |
### Subscriptions/SubscriptionLastError
| Scope | Editions | Applicable OS |
|:--|:--|:--|
| ✅ Device
❌ User | ✅ Pro
✅ Enterprise
✅ Education
❌ Windows SE
✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows Insider Preview |
```Device
./Vendor/MSFT/WindowsLicensing/Subscriptions/SubscriptionLastError
```
Error code of last subscription operation. Value would be empty(0) in absence of error.
**Description framework properties**:
| Property name | Property value |
|:--|:--|
| Format | `int` |
| Access Type | Get |
### Subscriptions/SubscriptionLastErrorDescription
| Scope | Editions | Applicable OS |
|:--|:--|:--|
| ✅ Device
❌ User | ✅ Pro
✅ Enterprise
✅ Education
❌ Windows SE
✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows Insider Preview |
```Device
./Vendor/MSFT/WindowsLicensing/Subscriptions/SubscriptionLastErrorDescription
```
Error description of last subscription operation. Value would be empty, if error description can't be evaluated.
**Description framework properties**:
| Property name | Property value |
|:--|:--|
| Format | `chr` (string) |
| Access Type | Get |
### Subscriptions/SubscriptionStatus
| Scope | Editions | Applicable OS |
|:--|:--|:--|
| ✅ Device
❌ User | ✅ Pro
✅ Enterprise
✅ Education
❌ Windows SE
✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows Insider Preview |
```Device
./Vendor/MSFT/WindowsLicensing/Subscriptions/SubscriptionStatus
```
Status of last subscription operation.
**Description framework properties**:
| Property name | Property value |
|:--|:--|
| Format | `int` |
| Access Type | Get |
### Subscriptions/SubscriptionType
| Scope | Editions | Applicable OS |
|:--|:--|:--|
| ✅ Device
❌ User | ✅ Pro
✅ Enterprise
✅ Education
❌ Windows SE
✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows Insider Preview |
```Device
./Vendor/MSFT/WindowsLicensing/Subscriptions/SubscriptionType
```
Set device to Device Based Subscription or User Based Subscription. For Device Based Subscription this action will automatically acquire the subscription on the device. For User Based Subscription the existing process of user logon will be required.
**Description framework properties**:
| Property name | Property value |
|:--|:--|
| Format | `int` |
| Access Type | Get, Replace |
**Allowed values**:
| Value | Description |
|:--|:--|
| 0 | User Based Subscription. |
| 1 | Device Based Subscription. |
## UpgradeEditionWithLicense
> [!NOTE]
> This policy is deprecated and may be removed in a future release.
| Scope | Editions | Applicable OS |
|:--|:--|:--|
| ✅ Device
❌ User | ✅ Pro
✅ Enterprise
✅ Education
❌ Windows SE
✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows 10, version 1511 [10.0.10586] and later |
```Device
./Vendor/MSFT/WindowsLicensing/UpgradeEditionWithLicense
```
Provide a license for an edition upgrade of Windows 10 mobile devices. Does not require reboot.
**Description framework properties**:
| Property name | Property value |
|:--|:--|
| Format | `xml` |
| Access Type | Exec |
## UpgradeEditionWithProductKey
| Scope | Editions | Applicable OS |
|:--|:--|:--|
| ✅ Device
❌ User | ✅ Pro
✅ Enterprise
✅ Education
❌ Windows SE
✅ IoT Enterprise / IoT Enterprise LTSC | ✅ Windows 10, version 1511 [10.0.10586] and later |
```Device
./Vendor/MSFT/WindowsLicensing/UpgradeEditionWithProductKey
```
Enter a product key for an edition upgrade of Windows 10 desktop devices. Requires reboot.
When a product key is pushed from an MDM server to a user's device, `changepk.exe` runs using the product key. After it completes, a notification is shown to the user that a new edition of Windows is available. The user can then restart their system manually or after two hours, the device will restart automatically to complete the upgrade. The user will receive a reminder notification 10 minutes before the automatic restart.
After the device restarts, the edition upgrade process completes. The user will receive a notification of the successful upgrade.
> [!NOTE]
> If another policy requires a system reboot that occurs when `changepk.exe` is running, the edition upgrade will fail.
If a product key is entered in a provisioning package and the user begins installation of the package, a notification is shown to the user that their system will restart to complete the package installation. Upon explicit consent from the user to proceed, the package continues installation and `changepk.exe` runs using the product key. The user will receive a reminder notification 30 seconds before the automatic restart.
After the device restarts, the edition upgrade process completes. The user will receive a notification of the successful upgrade.
This node can also be used to activate or change a product key on a particular edition of Windows 10 desktop device by entering a product key. Activation or changing a product key doesn't require a reboot and is a silent process for the user.
> [!IMPORTANT]
> The product key entered must be 29 characters (that is, it should include dashes), otherwise the activation, edition upgrade, or product key change on Windows 10 desktop devices will fail. The product key is acquired from Microsoft Volume Licensing Service Center. Your organization must have a Volume Licensing contract with Microsoft to access the portal.
The following are valid edition upgrade paths when using this node through an MDM:
- Windows 10/11 Enterprise to Windows 10/11 Education
- Windows 10/11 Home to Windows 10/11 Education
- Windows 10/11 Pro to Windows 10/11 Education
- Windows 10/11 Pro to Windows 10/11 Enterprise
Activation or changing a product key can be carried out on the following editions:
- Windows 10/11 Education
- Windows 10/11 Enterprise
- Windows 10/11 Home
- Windows 10/11 Pro
**Description framework properties**:
| Property name | Property value |
|:--|:--|
| Format | `chr` (string) |
| Access Type | Exec |
| Reboot Behavior | Automatic |
**Example**:
```xml
$CmdID$
-
./Device/Vendor/MSFT/WindowsLicensing/UpgradeEditionWithProductKey
chr
XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
```
> [!NOTE]
> `XXXXX-XXXXX-XXXXX-XXXXX-XXXXX` in the Data tag should be replaced with your product key.
## Related articles
[Configuration service provider reference](configuration-service-provider-reference.md)