Get SSL certificate Expiry details thorugh scripting

hi Team,

Is there any way we could get SSL expiry details through scripting so that i can trigger that using Email notification?

Or is there any other option to automate SSL expiry process. we have large number of ignition servers are it is difficult to manually track the SSL expiry.

Here is link to the Let's Encrypt Guide by Inductive: