Last active
November 29, 2017 16:14
-
-
Save notesbytom/4e7bbf7c5b8613ae6dc25ef6848811a7 to your computer and use it in GitHub Desktop.
Active Directory Certificate Services list certs that expire in future
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REM Change the filter and column list as needed to match your query needs. | |
set filter="Disposition = 20,NotAfter > 11/29/2017" | |
set columns="NotAfter,CommonName,DistinguishedName,DispositionMessage,Disposition,CertificateTemplate,NotBefore,SerialNumber" | |
certutil -view -restrict %filter% -out %columns% >certutil_view_issued_notexpired.txt | |
REM see https://blogs.technet.microsoft.com/pki/2008/10/03/disposition-values-for-certutil-view-restrict-and-some-creative-samples/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment