Security.GetCertificates
Method | |
---|---|
Module | Security |
Library | Security |
Action | Returns every certificate in the local machine cert store (as the agent is run as Local System). |
Parameters |
The short name of the store is preferable. If you use a long (friendly) name, the agent will attempt to map it to a store name. For example, 'Personal' would be mapped to 'My'. The agent can translate a number of default store names. If the agent cannot translate the name supplied, it will attempt to use the supplied string as the actual name of the store and open it anyway. If this is not supplied, the agent will iterate through predefined system stores (Intermediate Certification Authorities, Trusted Root Certification Authorities, Third-Party Certification Authorities, Enterprise Trust, Other People, Trusted People, Trusted Publisher and Untrusted Certificates), and thus you may actually get multiple hits for a particular certificate if it exists in multiple stores. |
Return values |
NoteThis is not actually part of the certificate, and a certificate could have a different friendly name associated with it on different devices, as it can be changed after issuing.
NoteSerialNumber is only unique to the CA that issued the certificate; it is not globally unique.
|
Example | Get information about all certificates in the local machine's certificate store: Security.GetCertificates(); |
Platforms |
|
Notes | Use the Windows command For example:
|