Win32_TSLicenseKeyPack class
Provides methods and properties for viewing and installing Remote Desktop Services license key packs.
Syntax
[dynamic, provider("Win32_WIN32_TERMSERVLICENSING_Prov"), AMENDMENT]
class Win32_TSLicenseKeyPack
{
uint32 KeyPackId;
string Description;
uint32 KeyPackType;
uint32 ProductType;
string ProductVersion;
uint32 ProductVersionID;
uint32 TotalLicenses;
uint32 IssuedLicenses;
uint32 AvailableLicenses;
DATETIME ExpirationDate;
uint32 AccessRights;
string TypeAndModel;
};
Members
The Win32_TSLicenseKeyPack class has these types of members:
Methods
The Win32_TSLicenseKeyPack class has these methods.
Method | Description |
---|---|
ConvertLicenses | Converts the licenses in the current key pack. |
ImportAgreementLicenseKeyPack | Imports, from another Remote Desktop license server, a Remote Desktop Services license key pack that was purchased through a license agreement, and automatically connects over the Internet to validate the key pack license. |
ImportLicenseKeyPackOffline | Imports, from another Remote Desktop license server, a Remote Desktop Services license key pack that uses a license identifier that was received over the Internet or the phone. |
ImportOpenPurchaseLicenseKeyPack | Imports, from another Remote Desktop license server, an Open License Remote Desktop Services license key pack. |
ImportRetailPurchaseLicenseKeyPack | Imports, from another Remote Desktop license server, a Remote Desktop Services license key pack that was purchased through a retail channel. |
InstallAgreementLicenseKeyPack | Installs a Remote Desktop Services license key pack that was purchased through an agreement license. |
InstallLicenseKeyPack | Installs a Remote Desktop Services license key pack that uses a license key pack ID that was received over the Internet or the phone. |
InstallOpenLicenseKeyPack | Installs a Remote Desktop Services license key pack that was purchased through an open license agreement. |
InstallRetailPurchaseLicenseKeyPack | Installs a Remote Desktop Services license key pack that was purchased through a retail store. |
ReinstallAgreementLicenseKeyPack | Reinstalls a Remote Desktop Services license key pack that was purchased through a license agreement, and automatically connects over the Internet to validate the key pack license. |
ReinstallLicenseKeyPackOffline | Reinstalls a Remote Desktop Services license key pack that uses the license identifier that was received over the Internet or the phone. |
ReinstallOpenPurchaseLicenseKeyPack | Reinstalls an Open License Remote Desktop Services license key pack. |
ReinstallRetailPurchaseLicenseKeyPack | Reinstalls a Remote Desktop Services license key pack that was purchased through a retail channel. |
RemoveLicensesWithIdCount | Removes the specified number of Remote Desktop Services licenses from the specified key pack. |
UninstallLicenseKeyPack | Uninstalls a Remote Desktop Services license key pack. |
UninstallLicenseKeyPackWithId | Uninstalls the Remote Desktop Services license key pack with the specified key pack identifier. |
Properties
The Win32_TSLicenseKeyPack class has these properties.
-
AccessRights
-
-
Data type: uint32
-
Access type: Read-only
-
Qualifiers: BitMap ("0", "1", "2", "3"), BitValues ("RD Session", "VDI Session", "Calista", "VDI Partners")
Qualifier for TS Licensing key pack access rights
-
-
AvailableLicenses
-
-
Data type: uint32
-
Access type: Read-only
Total number of available licenses in the Remote Desktop Services license key pack.
-
-
Description
-
-
Data type: string
-
Access type: Read-only
Description of the Remote Desktop Services license key pack.
-
-
ExpirationDate
-
-
Data type: DATETIME
-
Access type: Read-only
The expiration date of the Remote Desktop Services license key pack.
-
-
IssuedLicenses
-
-
Data type: uint32
-
Access type: Read-only
Total number of issued licenses in the Remote Desktop Services license key pack.
-
-
KeyPackId
-
-
Data type: uint32
-
Access type: Read-only
-
Qualifiers: key
Identifier for the Remote Desktop Services license key pack.
-
-
KeyPackType
-
-
Data type: uint32
-
Access type: Read-only
Type of key pack for the Remote Desktop license server.
Value Description 0 The Remote Desktop Services license key pack type is unknown. 1 The Remote Desktop Services license key pack type is a retail purchase. 2 The Remote Desktop Services license key pack type is a volume purchase. 3 The Remote Desktop Services license key pack type is a concurrent license. 4 The Remote Desktop Services license key pack type is temporary. 5 The Remote Desktop Services license key pack type is an open license. 6 Not supported. ProductType
-
-
-
Data type: uint32
-
Access type: Read-only
Product type of the Remote Desktop Services license key pack.
Value Description 0 The Remote Desktop Services license key pack product type is per device. Therefore, each device that connects to the RD Session Host server must have a license. 1 The Remote Desktop Services license key pack product type is per user. Therefore, each user who connects to the RD Session Host server must have a license. 2 This product type is not valid. 3 BuiltIn product type ProductVersion
-
-
-
Data type: string
-
Access type: Read-only
Product version for the Remote Desktop Services license key pack.
Value Description "Windows Server 2022" Only servers running Windows Server 2022 or lower are supported with this license. "Windows Server 2019" Only servers running Windows Server 2019 or lower are supported with this license. "Windows Server 2016" Only servers running Windows Server 2016 or lower are supported with this license. "Windows Server 2012" Only servers running Windows Server 2012, Windows Server 2008 R2, or Windows Server 2008 are supported with this license. "Windows Server 7" Only servers running Windows Server 2008 R2, or Windows Server 2008 are supported with this license. "Windows Server 2008" Only servers running Windows Server 2008 are supported by this key pack. ProductVersionID
-
-
-
Data type: uint32
-
Access type: Read-only
Product version identifier for the Remote Desktop Services license key pack.
Value Description 0 Not supported 1 Not supported 2 Windows Server 2008 3 Windows Server 2008 R2 4 Windows Server 2012/Windows Server 2012 R2 5 Windows Server 2016 6 Windows Server 2019 7 Windows Server 2022 TotalLicenses
-
-
-
Data type: uint32
-
Access type: Read-only
Total number of licenses in the Remote Desktop Services license key pack.
-
-
TypeAndModel
-
-
Data type: string
-
Access type: Read-only
Qualifier for TS Licensing key pack type and model. Examples: VDI Per Device subscription license, TS Per User CAL
-
Remarks
You must be a member of the Administrators group to use this class.
Managed Object Format (MOF) files contain the definitions for Windows Management Instrumentation (WMI) classes. MOF files are not installed as part of the Microsoft Windows Software Development Kit (SDK). They are installed on the server when you add the associated role by using the Server Manager. For more information about MOF files, see Managed Object Format (MOF).
Requirements
Requirement | Value |
---|---|
Minimum supported client |
None supported |
Minimum supported server |
Windows Server 2008 |
Namespace |
Root\CIMv2 |
MOF |
|
DLL |
|