Powershell script to find currently bound expiring certificates in IIS
I am trying to get a working script to check for expiring SSL certificates in IIS. There are many similar entries with simply getting the list of expiring installed certificates but I need some extra logic. I need to know all certificates expiring within x days that are A) currently bound to a website and B) that website must have a state of "Started" I have certain information gathered (below) but I am having trouble correlating them so they only give me the expiring certs I need. To add to the complexity, I can't simply look for the site name in the CN in the subject of the certificates