I run this PowerShell script to query for certificate bound to SQL server:
Get-WmiObject -Namespace 'ROOT\Microsoft\SqlServer\ComputerManagement14' -Class SecurityCertificate | select name,expirationdate
It properly returns the certificate's subject and expiration date as:
name expirationdate
---- --------------
servername.domain.com 31052014
However, I don't know what format that date is in as the certificate shows expiration as Thursday, August 17, 2023 2:34:27 AM
I've googled but found no results for the appropriate type of date that's being returned and how to convert to [datetime]. How can I understand this so that I can convert it and use it for comparisons?