Hey folks, I’m stuck in a loop. I’m responsible for a bunch of devices (50-100), each with digital certificates that can expire. Checking expiry manually every time is exhausting. Anyone found a better way to handle this?
How to check the expiry of digital certificates?Solved
Tags
Replies (6)
Oof, yeah, manually checking that many devices sounds like a nightmare. What platform are you managing?
It’s a mix, both Windows and macOS. We manage devices across both platforms.
I used a script from Hexnode’s documentation that could automate certificate expiry checks on Windows devices.
Here’s the link if you want to check it out: https://www.hexnode.com/mobile-device-management/help/script-to-check-certificate-expiry-on-windows-devices/
As for Mac, I didn’t find a script like the one for Windows, but you can use Keychain Access to check certificate expiry manually. https://support.apple.com/en-hk/guide/keychain-access/kyca2794/mac It might not be automatic, but you can at least quickly see expiry dates from there.
Thanks, I’ll check it out.
Actually, if you want to automate on Mac too, try using this command in Terminal:
1 |
security find-certificate -a -p /Library/Keychains/System.keychain | openssl x509 -noout -subject –enddate |
This lists all certificates in the System keychain along with their expiry dates. Replace “System.keychain” in /Library/Keychains/System.keychain with other keychains like login.keychain-db or SystemRootCertificates.keychain if you want.
Hey all, just wanted to share an update. I ran both scripts, and they worked great! Huge relief and saved me tons of time. Thanks for the help!