Class: WMI::OfficeSoftwareProtectionService

Inherits:
Base
  • Object
show all
Defined in:
lib/OfficeSoftwareProtectionService.rb

Overview

This class exposes product-independent properties and methods of the Software Licensing service.

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Methods inherited from Base

#AddRef, #AssociatorsAsync_, #Associators_, #Clone_, #CompareTo_, #DeleteAsync_, #Delete_, #Derivation_, #ExecMethodAsync_, #ExecMethod_, #GetIDsOfNames, #GetObjectText_, #GetText_, #GetTypeInfo, #GetTypeInfoCount, #InstancesAsync_, #Instances_, #Invoke, #Methods_, #Path_, #Properties_, #PutAsync_, #Put_, #Qualifiers_, #QueryInterface, #ReferencesAsync_, #References_, #Refresh_, #Release, #Security_, #SetFromText_, #SpawnDerivedClass_, #SpawnInstance_, #SubclassesAsync_, #Subclasses_, #SystemProperties_

Instance Attribute Details

- (string) ClientMachineID (readonly)

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

Returns:

  • (string)

    ClientMachineID



123
124
125
# File 'lib/OfficeSoftwareProtectionService.rb', line 123

def ClientMachineID
  @ClientMachineID
end

- (uint32) IsKeyManagementServiceMachine (readonly)

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

Returns:

  • (uint32)

    IsKeyManagementServiceMachine



128
129
130
# File 'lib/OfficeSoftwareProtectionService.rb', line 128

def IsKeyManagementServiceMachine
  @IsKeyManagementServiceMachine
end

- (boolean) KeyManagementServiceActivationDisabled (readonly)

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

Returns:

  • (boolean)

    KeyManagementServiceActivationDisabled



133
134
135
# File 'lib/OfficeSoftwareProtectionService.rb', line 133

def KeyManagementServiceActivationDisabled
  @KeyManagementServiceActivationDisabled
end

- (uint32) KeyManagementServiceCurrentCount (readonly)

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.

Returns:

  • (uint32)

    KeyManagementServiceCurrentCount



138
139
140
# File 'lib/OfficeSoftwareProtectionService.rb', line 138

def KeyManagementServiceCurrentCount
  @KeyManagementServiceCurrentCount
end

- (boolean) KeyManagementServiceDnsPublishing (readonly)

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

Returns:

  • (boolean)

    KeyManagementServiceDnsPublishing



143
144
145
# File 'lib/OfficeSoftwareProtectionService.rb', line 143

def KeyManagementServiceDnsPublishing
  @KeyManagementServiceDnsPublishing
end

- (uint32) KeyManagementServiceFailedRequests (readonly)

The count of invalid KMS requests.

Returns:

  • (uint32)

    KeyManagementServiceFailedRequests



148
149
150
# File 'lib/OfficeSoftwareProtectionService.rb', line 148

def KeyManagementServiceFailedRequests
  @KeyManagementServiceFailedRequests
end

- (boolean) KeyManagementServiceHostCaching (readonly)

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

Returns:

  • (boolean)

    KeyManagementServiceHostCaching



153
154
155
# File 'lib/OfficeSoftwareProtectionService.rb', line 153

def KeyManagementServiceHostCaching
  @KeyManagementServiceHostCaching
end

- (uint32) KeyManagementServiceLicensedRequests (readonly)

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

Returns:

  • (uint32)

    KeyManagementServiceLicensedRequests



158
159
160
# File 'lib/OfficeSoftwareProtectionService.rb', line 158

def KeyManagementServiceLicensedRequests
  @KeyManagementServiceLicensedRequests
end

- (uint32) KeyManagementServiceListeningPort (readonly)

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

Returns:

  • (uint32)

    KeyManagementServiceListeningPort



163
164
165
# File 'lib/OfficeSoftwareProtectionService.rb', line 163

def KeyManagementServiceListeningPort
  @KeyManagementServiceListeningPort
end

- (boolean) KeyManagementServiceLowPriority (readonly)

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

Returns:

  • (boolean)

    KeyManagementServiceLowPriority



168
169
170
# File 'lib/OfficeSoftwareProtectionService.rb', line 168

def KeyManagementServiceLowPriority
  @KeyManagementServiceLowPriority
end

- (string) KeyManagementServiceMachine (readonly)

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

Returns:

  • (string)

    KeyManagementServiceMachine



173
174
175
# File 'lib/OfficeSoftwareProtectionService.rb', line 173

def KeyManagementServiceMachine
  @KeyManagementServiceMachine
end

- (uint32) KeyManagementServiceNonGenuineGraceRequests (readonly)

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

Returns:

  • (uint32)

    KeyManagementServiceNonGenuineGraceRequests



178
179
180
# File 'lib/OfficeSoftwareProtectionService.rb', line 178

def KeyManagementServiceNonGenuineGraceRequests
  @KeyManagementServiceNonGenuineGraceRequests
end

- (uint32) KeyManagementServiceNotificationRequests (readonly)

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

Returns:

  • (uint32)

    KeyManagementServiceNotificationRequests



183
184
185
# File 'lib/OfficeSoftwareProtectionService.rb', line 183

def KeyManagementServiceNotificationRequests
  @KeyManagementServiceNotificationRequests
end

- (uint32) KeyManagementServiceOOBGraceRequests (readonly)

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

Returns:

  • (uint32)

    KeyManagementServiceOOBGraceRequests



188
189
190
# File 'lib/OfficeSoftwareProtectionService.rb', line 188

def KeyManagementServiceOOBGraceRequests
  @KeyManagementServiceOOBGraceRequests
end

- (uint32) KeyManagementServiceOOTGraceRequests (readonly)

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

Returns:

  • (uint32)

    KeyManagementServiceOOTGraceRequests



193
194
195
# File 'lib/OfficeSoftwareProtectionService.rb', line 193

def KeyManagementServiceOOTGraceRequests
  @KeyManagementServiceOOTGraceRequests
end

- (uint32) KeyManagementServicePort (readonly)

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

Returns:

  • (uint32)

    KeyManagementServicePort



198
199
200
# File 'lib/OfficeSoftwareProtectionService.rb', line 198

def KeyManagementServicePort
  @KeyManagementServicePort
end

- (uint32) KeyManagementServiceTotalRequests (readonly)

The total count of valid KMS requests.

Returns:

  • (uint32)

    KeyManagementServiceTotalRequests



203
204
205
# File 'lib/OfficeSoftwareProtectionService.rb', line 203

def KeyManagementServiceTotalRequests
  @KeyManagementServiceTotalRequests
end

- (uint32) KeyManagementServiceUnlicensedRequests (readonly)

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

Returns:

  • (uint32)

    KeyManagementServiceUnlicensedRequests



208
209
210
# File 'lib/OfficeSoftwareProtectionService.rb', line 208

def KeyManagementServiceUnlicensedRequests
  @KeyManagementServiceUnlicensedRequests
end

- (uint32) PolicyCacheRefreshRequired (readonly)

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

Returns:

  • (uint32)

    PolicyCacheRefreshRequired



213
214
215
# File 'lib/OfficeSoftwareProtectionService.rb', line 213

def PolicyCacheRefreshRequired
  @PolicyCacheRefreshRequired
end

- (uint32) RequiredClientCount (readonly)

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

Returns:

  • (uint32)

    RequiredClientCount



218
219
220
# File 'lib/OfficeSoftwareProtectionService.rb', line 218

def RequiredClientCount
  @RequiredClientCount
end

- (string) Version (readonly)

Version of the Software Licensing service

Returns:

  • (string)

    Version



223
224
225
# File 'lib/OfficeSoftwareProtectionService.rb', line 223

def Version
  @Version
end

- (uint32) VLActivationInterval (readonly)

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

Returns:

  • (uint32)

    VLActivationInterval



228
229
230
# File 'lib/OfficeSoftwareProtectionService.rb', line 228

def VLActivationInterval
  @VLActivationInterval
end

- (uint32) VLRenewalInterval (readonly)

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

Returns:

  • (uint32)

    VLRenewalInterval



233
234
235
# File 'lib/OfficeSoftwareProtectionService.rb', line 233

def VLRenewalInterval
  @VLRenewalInterval
end

Instance Method Details

- (uint32) AcquireGenuineTicket(ServerUrl, TemplateId)

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

Parameters:

  • (string, #read) ServerUrl
  • (string, #read) TemplateId

Returns:

  • (uint32)


76
77
# File 'lib/OfficeSoftwareProtectionService.rb', line 76

def AcquireGenuineTicket ServerUrl, TemplateId
end

- (uint32) ClearKeyManagementServiceListeningPort

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

Returns:

  • (uint32)


89
90
# File 'lib/OfficeSoftwareProtectionService.rb', line 89

def ClearKeyManagementServiceListeningPort 
end

- (uint32) ClearKeyManagementServiceMachine

Clears any previously configured KMS host name.

Returns:

  • (uint32)


35
36
# File 'lib/OfficeSoftwareProtectionService.rb', line 35

def ClearKeyManagementServiceMachine 
end

- (uint32) ClearKeyManagementServicePort

Clears any previously specified port number.

Returns:

  • (uint32)


48
49
# File 'lib/OfficeSoftwareProtectionService.rb', line 48

def ClearKeyManagementServicePort 
end

- (uint32) ClearProductKeyFromRegistry

Clears product key from the registry.

Returns:

  • (uint32)


68
69
# File 'lib/OfficeSoftwareProtectionService.rb', line 68

def ClearProductKeyFromRegistry 
end

- (uint32) DisableKeyManagementServiceActivation(DisableActivation)

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

Parameters:

  • (boolean, #read) DisableActivation

Returns:

  • (uint32)


117
118
# File 'lib/OfficeSoftwareProtectionService.rb', line 117

def DisableKeyManagementServiceActivation DisableActivation
end

- (uint32) DisableKeyManagementServiceDnsPublishing(DisablePublishing)

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

Parameters:

  • (boolean, #read) DisablePublishing

Returns:

  • (uint32)


96
97
# File 'lib/OfficeSoftwareProtectionService.rb', line 96

def DisableKeyManagementServiceDnsPublishing DisablePublishing
end

- (uint32) DisableKeyManagementServiceHostCaching(DisableCaching)

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

Parameters:

  • (boolean, #read) DisableCaching

Returns:

  • (uint32)


110
111
# File 'lib/OfficeSoftwareProtectionService.rb', line 110

def DisableKeyManagementServiceHostCaching DisableCaching
end

- (uint32) EnableKeyManagementServiceLowPriority(EnableLowPriority)

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

Parameters:

  • (boolean, #read) EnableLowPriority

Returns:

  • (uint32)


103
104
# File 'lib/OfficeSoftwareProtectionService.rb', line 103

def EnableKeyManagementServiceLowPriority EnableLowPriority
end

- (uint32) InstallLicense(License)

Installs a license.

Parameters:

  • (string, #read) License

Returns:

  • (uint32)


15
16
# File 'lib/OfficeSoftwareProtectionService.rb', line 15

def InstallLicense License
end

- (uint32) InstallLicensePackage(LicensePackage)

Install a license package for the current product.

Parameters:

  • (string, #read) LicensePackage

Returns:

  • (uint32)


22
23
# File 'lib/OfficeSoftwareProtectionService.rb', line 22

def InstallLicensePackage LicensePackage
end

- (uint32) InstallProductKey(ProductKey)

Install a product key.

Parameters:

  • (string, #read) ProductKey

Returns:

  • (uint32)


8
9
# File 'lib/OfficeSoftwareProtectionService.rb', line 8

def InstallProductKey ProductKey
end

- (uint32) SetKeyManagementServiceListeningPort(PortNumber)

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.

Parameters:

  • (uint32, #read) PortNumber

Returns:

  • (uint32)


83
84
# File 'lib/OfficeSoftwareProtectionService.rb', line 83

def SetKeyManagementServiceListeningPort PortNumber
end

- (uint32) SetKeyManagementServiceMachine(MachineName)

Sets the KMS host name to use for volume activation.

Parameters:

  • (string, #read) MachineName

Returns:

  • (uint32)


29
30
# File 'lib/OfficeSoftwareProtectionService.rb', line 29

def SetKeyManagementServiceMachine MachineName
end

- (uint32) SetKeyManagementServicePort(PortNumber)

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

Parameters:

  • (uint32, #read) PortNumber

Returns:

  • (uint32)


42
43
# File 'lib/OfficeSoftwareProtectionService.rb', line 42

def SetKeyManagementServicePort PortNumber
end

- (uint32) SetVLActivationInterval(ActivationInterval)

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.

Parameters:

  • (uint32, #read) ActivationInterval

Returns:

  • (uint32)


55
56
# File 'lib/OfficeSoftwareProtectionService.rb', line 55

def SetVLActivationInterval ActivationInterval
end

- (uint32) SetVLRenewalInterval(RenewalInterval)

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.

Parameters:

  • (uint32, #read) RenewalInterval

Returns:

  • (uint32)


62
63
# File 'lib/OfficeSoftwareProtectionService.rb', line 62

def SetVLRenewalInterval RenewalInterval
end