July 24th, 2019

PowerTip: Show files with expired Digital Certificates

Doctor Scripto
Scripter

Summary: Targeting Expired Certificates with Get-AuthenticodeSignature

A picture containing scissors Description automatically generated

Question: Hey Doctor Scripto! Is there an easy way to visually identify Digitally signed files with an Expired status on the Digital Certificate?

Answer: Absolutely! We just need to filter on the “Status” property and show those without the value ‘Valid’. As an added bonus it would also identify files that are not digitally signed.

Get-Childitem C:\Folder\*.* -Recurse | Get-AuthenticodeSignature | Where-Object { $_.Status -ne ‘Valid’ }

PowerShell, Doctor Scripto, PowerTip

 

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.