This advanced function allows you to query remote and local machines for their certificates and also report back which ones are expired or expiring. You can also look at archived certificates and filter based on a number of properties.

 

PowerShell
Edit|Remove
. .\Get-PKICertificates.ps1

 
PowerShell
Edit|Remove
    .EXAMPLE 
        Get-Certificate -Computername 'boe-pc' -StoreName My -StoreLocation  LocalMachine 
 
        Thumbprint                                 Subject                               
        ----------                                 -------                               
        F29B6CB248E3395B2EB45FCA6EA15005F64F2B4E   CN=SomeCert                           
        B93BA840652FB8273CCB1ABD804B2A035AA39877   CN=YetAnotherCert                     
        B1FF5E183E5C4F03559E80B49C2546BBB14CCB18   CN=BOE                                
        65F5A012F0FE3DF8AC6B5D6E07817F05D2DF5104   CN=SomeOtherCert                      
        63BD74490E182A341405B033DFE6768E00ECF21B   CN=www.example.com 
 
        Description 
        ----------- 
        Lists all certificates 
 
    .EXAMPLE 
        Get-Certificate -Computername 'boe-pc' -StoreName My -StoreLocation  LocalMachine -Subject '*Boe*' 
 
        Thumbprint                                 Subject                               
        ----------                                 -------                                                 
        B1FF5E183E5C4F03559E80B49C2546BBB14CCB18   CN=BOE                                
 
        Description 
        ----------- 
        Lists certificates that contain the subject: boe