This chapter focuses on the Certificate class in WMI.

The Certificate Class

The Certificate class provides information about a certificate as well as information about when the certificate will expire. All properties are read only. For each configured certificate, one class instance exists. The property SerialNumber has the key qualifier and uniquely identifies a certificate instance.

Certifcate Class Properties

The table below lists the properties of the Certificate class in alphabetical order. All properties are read-only.

Some WMI queries are only available starting from anynode version 4.14.(Check out available WMI queries with the PowerShell command below).

To display all available contents of the System class locally without credentials, you can use the following command:

Get-WmiObject -Namespace "root\TESYSTEMS\anynode" -Class "System"

-Namespace "root\TESYSTEMS\anynode" : Specifies the WMI namespace for anynode.

-Class "Certificate" : Selects the "Certificate" class to retrieve its contents.


Property: Active

Type: boolean

Description: The property is true if the certificate is active. If the property is false, the certificate is not yet valid or expired.


Property: Expired

Type: boolean

Description: The property is true if the certificate is expired.


Property: ExpiresInDays

Type: uint32

Description: The property provides the remaining days the certificate is valid. If the certificate is expired, the property is set to zero, the property Active is set to false, and the property Expired is set to true.


Property: IssuerCommonName

Type: string

Description: The property provides the common name set by the issuer. This could be a symbolic name or a domain name.


Property: IssuerCountry

Type: string

Description: The property provides the country code set by the issuer of the certificate, e.g., DE. The information is optional, and the property may return an empty string.


Property: IssuerLocality

Type: string

Description: The property provides the locality set by the issuer. This may be the city, e.g., Redmond. The information is optional, and the property may return an empty string.


Property: IssuerOrganization

Type: string

Description: The property provides the organization set by the issuer. The information is optional, and the property may return an empty string.


Property: IssuerOrganizationUnit

Type: string

Description: The property provides the organization unit set by the issuer, e.g., Marketing. The information is optional, and the property may return an empty string.


Property: IssuerState

Type: string

Description: The property provides the state set by the issuer, e.g., Washington. The information is optional, and the property may return an empty string.


Property: Name

Type: string

Description: The property provides the name of the certificate. The information depends on the issuer and is optional. The property may return an empty string.


Property: SerialNumber

Type: string

Description: The serial number of the certificate. This may be a short number like 1 or a long identifier like B9:EE:D4:D9:55:A5:9E:B4. The serial number is unique and has the key qualifier, uniquely identifying a certificate instance.


Property: SubjectCommonName

Type: string

Description: The property provides the common name set in the subject. This could be a symbolic name or a domain name. The information is optional, and the property may return an empty string.


Property: SubjectCountry

Type: string

Description: The property provides the country code set in the subject of the certificate, e.g., DE. The information is optional, and the property may return an empty string.


Property: SubjectLocality

Type: string

Description: The property provides the locality set in the subject. This may be the city, e.g., Redmond. The information is optional, and the property may return an empty string.


Property: SubjectOrganization

Type: string

Description: The property provides the organization set in the subject. The information is optional, and the property may return an empty string.


Property: SubjectOrganizationUnit

Type: string

Description: The property provides the organization unit set in the subject, e.g., Marketing. The information is optional, and the property may return an empty string.


Property: SubjectState

Type: string

Description: The property provides the state set in the subject, e.g., Washington. The information is optional, and the property may return an empty string.


Property: ValidFrom

Type: datetime

Description: The property provides the date and time when the certificate becomes valid. The format is the WMI datetime format.


Property: ValidUntil

Type: datetime

Description: The property provides the date and time when the certificate becomes invalid. The format is the WMI datetime format.


Property: Version

Type: uint32

Description: The property provides the version number of the certificate.