我运行此 PowerShell 脚本来查询绑定到 SQL Server 的证书:
\nGet-WmiObject -Namespace 'ROOT\\Microsoft\\SqlServer\\ComputerManagement14' -Class SecurityCertificate | select name,expirationdate\nRun Code Online (Sandbox Code Playgroud)\n它正确返回证书的主题和到期日期,如下所示:
\nname expirationdate\n---- --------------\nservername.domain.com 31052014\nRun Code Online (Sandbox Code Playgroud)\n但是,我不知道该日期的格式是什么,因为证书显示过期为 \xe2\x80\x8eThursday, \xe2\x80\x8eAugust \xe2\x80\x8e17, \xe2\x80\x8e2023 2:34:27 AM
我用谷歌搜索,但没有找到有关返回的适当类型的日期以及如何转换为[日期时间]的结果。我怎样才能理解这一点,以便我可以将其转换并用于比较?
\n