How to check the expiry of digital certificates?Solved

Participant
Discussion
Oct 06, 2025

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?

Replies (6)

Marked SolutionPending Review
Participant
Oct 06, 2025
Marked SolutionPending Review

Oof, yeah, manually checking that many devices sounds like a nightmare. What platform are you managing?

Marked SolutionPending Review
Participant
Oct 07, 2025
Marked SolutionPending Review

It’s a mix, both Windows and macOS. We manage devices across both platforms.

Marked SolutionPending Review
Participant
Oct 10, 2025
Marked SolutionPending Review

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.

Marked SolutionPending Review
Participant
Oct 11, 2025
Marked SolutionPending Review

Thanks, I’ll check it out.

Marked SolutionPending Review
Participant
Oct 11, 2025
Marked SolutionPending Review

Actually, if you want to automate on Mac too, try using this command in Terminal:

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.

Marked SolutionPending Review
Participant
Oct 15, 2025
Marked SolutionPending Review

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!

Save