How do i install modules of PowerShell to examine the certificate stores and verify certificate details.

Unai Semeone 20 Reputation points
2026-11-16T17:02:37.11+00:00

How do i install modules of PowerShell to examine the certificate stores and verify certificate details. Help please thanks.

Windows for business | Windows 365 Enterprise
0 comments No comments

Answer accepted by question author
Ronald Sabiiti 2,000 Reputation points Independent Advisor
2026-11-16T17:52:41.38+00:00

Hi Unai,

You don't need to install an additional PowerShell module to examine Windows certificate stores. Windows PowerShell includes a built-in Certificate Provider that allows you to browse and inspect certificates.

You can list available certificate stores using:

Get-ChildItem Cert:\

To view certificates in the Local Machine Personal store:

Get-ChildItem Cert:\LocalMachine\My |
Select-Object Subject, Issuer, Thumbprint, NotBefore, NotAfter, HasPrivateKey

You can also run these commands remotely using PowerShell Remoting.

For more information, please refer to Microsoft's documentation:

Hope this helps!

Ronald

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

1 additional answer

Sort by: Most helpful
  1. AI answer

    2026-11-16T17:03:18.03+00:00

    You do not need to install a separate PowerShell module on Windows; the built-in Certificate provider exposes certificate stores through the Cert: drive.^1^

    Examine certificate stores

    Open PowerShell. Use Run as administrator when inspecting or managing Local Computer stores; Current User inspection normally does not require elevation.

    # Confirm that the Certificate provider is available
    Get-PSProvider -PSProvider Certificate
    
    # Display the two main store scopes
    Get-ChildItem Cert:\
    
    # List personal certificates for the signed-in user
    Get-ChildItem Cert:\CurrentUser\My
    
    # List personal certificates installed for the computer
    Get-ChildItem Cert:\LocalMachine\My
    

    CurrentUser contains stores associated with the signed-in user. LocalMachine contains computer-wide stores. Other common store names include:

    • My — Personal certificates
    • Root — Trusted Root Certification Authorities
    • CA — Intermediate Certification Authorities

    The Certificate provider is available only when PowerShell is running on Windows.^2^

    Display and verify certificate details

    The following read-only inventory lists the most useful properties:

    Get-ChildItem Cert:\CurrentUser\My |
        Select-Object Subject, Issuer, Thumbprint, NotBefore, NotAfter,
            HasPrivateKey, DnsNameList, EnhancedKeyUsageList |
        Format-List
    

    To examine one certificate, copy its thumbprint from the preceding output:

    $thumbprint = 'REPLACE_WITH_THUMBPRINT'
    $cert = Get-Item "Cert:\LocalMachine\My\$thumbprint"
    
    $cert | Format-List Subject, Issuer, SerialNumber, Thumbprint,
        NotBefore, NotAfter, HasPrivateKey, DnsNameList,
        EnhancedKeyUsageList
    

    Certificates are represented as X509Certificate2 objects and are addressed by thumbprint in the Cert: drive.^1^

    To find certificates that have already expired or will expire within 30 days:

    $today = Get-Date
    $limit = $today.AddDays(30)
    
    Get-ChildItem Cert:\CurrentUser\My, Cert:\LocalMachine\My |
        Where-Object { $_.NotAfter -le $limit } |
        Select-Object Subject, Thumbprint, NotAfter,
            @{Name='Expired'; Expression={$_.NotAfter -lt $today}}
    

    Validate an SSL server certificate

    On systems where Test-Certificate is available, specify the expected DNS name:

    Get-ChildItem Cert:\LocalMachine\My |
        Test-Certificate -Policy SSL -DNSName 'dns=server.contoso.com'
    

    Test-Certificate checks the certificate against the supplied SSL policy and checks revocation by default. A result of True means it passed that policy in the selected chain context; it does not replace an end-to-end test of the application using the certificate.^3^

    Graphical inspection

    For a visual check of the certification chain:

    • Run certmgr.msc for the Current User stores.
    • Run certlm.msc for the Local Computer stores.
    • Open the certificate and inspect:
      • General for validity status
      • Details for subject, issuer, thumbprint, DNS names, and intended purposes
      • Certification Path for root and intermediate-chain trust

    Avoid adding or deleting certificates—particularly under Cert:\LocalMachine\Root—unless the issuer and required destination are known. Changing the computer’s Trusted Root store changes which certificate authorities the whole computer trusts.^3^


    References

    1. about_Certificate_Provider
    2. about_Providers
    3. Inspect certificates and manage certificate store contents
    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.