- WMI Library -
WMI Libraly > SoftwareLicensingService Class

SoftwareLicensingService Class

This class exposes product-independent properties and methods of the Software Licensing service.
Namespace value is root/CIMV2.
WMI Provider value is SppProvider.


Properties

  • ClientMachineID
  • The GUID that identifies a KMS client to a KMS host. The client includes this in requests it sends to the KMS.

  • DiscoveredKeyManagementServiceMachineName
  • Last discovered KMS host name through DNS.

  • DiscoveredKeyManagementServiceMachinePort
  • Last discovered KMS host port through DNS.

  • IsKeyManagementServiceMachine
  • Indicates whether KMS is enabled on the computer: 0 if false, 1 if true.

  • KeyManagementServiceActivationDisabled
  • Indicates whether the volume activation through key management service is disabled.

  • KeyManagementServiceCurrentCount
  • The count of currently active KMS clients on the KMS host. -1 indicates the computer is not enabled as a KMS, or has not received any client licensing-requests.

  • KeyManagementServiceDnsPublishing
  • Indicates the DNS publishing status of a KMS host: 0=Disabled, 1=Auto publish enabled (default).

  • KeyManagementServiceFailedRequests
  • The count of invalid KMS requests.

  • KeyManagementServiceHostCaching
  • Indicates the caching status of KMS host name and port: 0=Caching disabled, 1=Caching enabled (default).

  • KeyManagementServiceLicensedRequests
  • The count of KMS requests from clients with License Status=1 (Licensed).

  • KeyManagementServiceListeningPort
  • The TCP port the KMS host uses to listen for activation requests.

  • KeyManagementServiceLowPriority
  • Indicates the thread priority status of KMS service: 0=Normal Priority (default), 1=Low priority.

  • KeyManagementServiceMachine
  • The name of the KMS host. Returns null if SetKeyManagementServiceMachine has not been called.

  • KeyManagementServiceNonGenuineGraceRequests
  • The count of KMS requests from clients with License Status=4 (NonGenuineGrace).

  • KeyManagementServiceNotificationRequests
  • The count of KMS requests from clients with License Status=5 (Notification).

  • KeyManagementServiceOOBGraceRequests
  • The count of KMS requests from clients with License Status=2 (OOBGrace).

  • KeyManagementServiceOOTGraceRequests
  • The count of KMS requests from clients with License Status=3 (OOTGrace).

  • KeyManagementServicePort
  • The TCP port used by clients to send KMS-activation requests. Returns 0 if SetKeyManagementServicePort has not been called.

  • KeyManagementServiceProductKeyID
  • KMS product key ID. Returns null if not applicable.

  • KeyManagementServiceTotalRequests
  • The total count of valid KMS requests.

  • KeyManagementServiceUnlicensedRequests
  • The count of KMS requests from clients with License Status=0 (Unlicensed).

  • PolicyCacheRefreshRequired
  • Indicates whether the licensing policy-cache needs to be updated: 0=not required, 1=Refresh required.

  • RemainingWindowsReArmCount
  • Remaining number of times the client can be rearmed successfully.

  • RequiredClientCount
  • The minimum number of clients required to connect to a KMS host in order to enable volume licensing.

  • TokenActivationAdditionalInfo
  • Additional information for token-based activation.

  • TokenActivationCertificateThumbprint
  • Thumbprint of the certificate that activated the machine.

  • TokenActivationGrantNumber
  • Grant number in the token-based activation license that activated the machine.

  • TokenActivationILID
  • ID of the token-based activation license that activated the machine.

  • TokenActivationILVID
  • Version of the token-based activation license that activated the machine.

  • Version
  • Version of the Software Licensing service

  • VLActivationInterval
  • The frequency, in minutes, of how often a client will contact the KMS host before the client is licensed.

  • VLRenewalInterval
  • The frequency, in minutes, of how often a client will contact the KMS host after the client is licensed.


    Methods

  • InstallProductKey
  • Install a product key.

  • InstallLicense
  • Installs a license.

  • InstallLicensePackage
  • Install a license package for the current product.

  • SetKeyManagementServiceMachine
  • Sets the KMS host name to use for volume activation.

  • ClearKeyManagementServiceMachine
  • Clears any previously configured KMS host name.

  • SetKeyManagementServicePort
  • Sets the TCP port used by a client to make requests of a KMS host. If not specified, port 1688 is used.

  • ClearKeyManagementServicePort
  • Clears any previously specified port number.

  • SetVLActivationInterval
  • The activation frequency, in minutes, of how often KMS-clients will contact the KMS host before they become licensed. The frequency must be greater than or equal to 15 and less than or equal to 43200. An error is returned if the method is called and the computer is not a KMS.

  • SetVLRenewalInterval
  • The renewal frequency, in minutes, of how often KMS-clients will contact the KMS host after they have become licensed. The frequency must be greater than or equal to 15 and less than or equal to 43200. An error is returned if the method is called and the computer is not a KMS.

  • ClearProductKeyFromRegistry
  • Clears product key from the registry.

  • AcquireGenuineTicket
  • Performs online Genuine Validation. Calling this method may change the Genuine status of the computer.

  • ReArmWindows
  • Resets the licensing status of the computer to OOB Grace (see LicenseStatus). Note: you must reboot the client for the changes to take effect.

  • RefreshLicenseStatus
  • Updates the licensing status of Windows so that applications have access to current licensing information.

  • SetKeyManagementServiceListeningPort
  • Sets the TCP port used by a KMS host to listen for activation requests. Applies to KMS hosts only. If not specified, 1688 is used.

  • ClearKeyManagementServiceListeningPort
  • Clears any previously specified listening port. Applies to KMS hosts only.

  • DisableKeyManagementServiceDnsPublishing
  • Enable/Disable the DNS Publishing on a KMS host computer: 0=Enable, 1=Disable.

  • EnableKeyManagementServiceLowPriority
  • Enable/Disable KMS service running with low priority: 0=Disable, 1=Enable.

  • DisableKeyManagementServiceHostCaching
  • Enable/Disable the caching of the KMS hostname and port on a volume activation client computer: 0=Enable, 1=Disable.

  • DisableKeyManagementServiceActivation
  • Enable/Disable volume activation through KMS machine: 0=Enable, 1=Disable.


    Example WQL

    SELECT * FROM SoftwareLicensingService
    About this site information

    This contents is created by WMI having class information.
    WMI Environment is Windows Server 2008 R2 Enterprise Edition.

    This link is Microsoft documents for "Managing Windows with WMI".
    That is VB(Visual Basic) scripting sample.
    This link is Microsoft documents for "Advanced Programming Topics in WMI .NET".
    That is VB.net(Visual Basic .net) scripting sample.

    - WMI Library -
    http://library.wmifun.net/

    WMI useful by VB,VB.Net,VC,VC.Net,VC#.Net,VBS(WSH),PowerShell for PC asset management, system monitoring and collecting hardware and software inventory.

    This website is created by Toh.
    Copyright(C) 1997-2016 WMI Fun !!. All rights reserved.
    ^ Go to the top...