We are running an NPS-Server on Windows Server 2016 that serves as a Radius-Server for our wifi-network. A few days ago, all clients lost the connection because the validity of the certificate in use for the MS-PEAP-Protocol ended.
Now we would like to add an automatic check that warns us before the certificate will end the next time. It should connect to the server as a normal client and check if the certificate is still valid for another 3 weeks.
Is there a solution for this using the powershell? Or any other programming language?
I already found a script that can replace the certificate, the server uses for MS-PEAP-Connections (https://www.powershellgallery.com/packages/Posh-ACME.Deploy/1.3.0/Content/Public%5CSet-NPSCertificate.ps1). But I am looking for a script that checks if this was successful.