January 25, 2018 at 6:51 am
Hi,
Is there any way to programmatically retrieve SQL Server Network Configuration-> Protocols for MSSQLSERVER-> Certificate tab-> Expiration date property through SMO, powershell?
Thanks.
January 26, 2018 at 4:11 pm
praveen_vejandla - Thursday, January 25, 2018 6:51 AMHi,Is there any way to programmatically retrieve SQL Server Network Configuration-> Protocols for MSSQLSERVER-> Certificate tab-> Expiration date property through SMO, powershell?
Thanks.
It's been awhile since I did it and can't find the script but you can get the thumbprint in the following registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.x\MSSQLServer\SuperSocketNetLib\Certificate
You can get that programmatically using xp_regread.
Then I used this article about Certificates and Powershell to get the certificate properties by thumbprint. Expiration property is NotAfter when getting the properties in Powershell:
Working with Certificates in PowerShell
If you wanted an already written script, I'd probably check the Technet Gallery
Sue
January 30, 2018 at 8:57 am
Thanks for the reply.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy