Query Network Protocols from T-SQL or PowerShell

  • Hello experts,

    I want to be more organized about the SSL certificates we have bound to SQL Servers. Is there a way to use T-SQL or PowerShell to retrieve that information, especially the cert name and expiration date?

    If I can gather such info in a table, I can sort it and predict when to expect the warning, and then update the certs before the patching.

    Thanks for any help.

    -- webrunner

    • This topic was modified 3 weeks, 5 days ago by  webrunner.

    -------------------
    A SQL query walks into a bar and sees two tables. He walks up to them and asks, "Can I join you?"
    Ref.: http://tkyte.blogspot.com/2009/02/sql-joke.html

  • This was removed by the editor as SPAM

  • if you want to extract that information from the OS:

    # View certificates in the Local Machine's Personal store
    Get-ChildItem -Path Cert:\LocalMachine\My

    # Get detailed info for a certificate by thumbprint
    $MachineCert |%{
    <# Get detailed info for a certificate by thumbprint #>
    $CertInfo = $_
    $CertPath = $('Cert:\LocalMachine\My\{0}' -f $CertInfo.Thumbprint )
    Get-ChildItem -Path $CertPath #| Format-List -Property *
    }

     

    It's a start ...

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

  • Hi Johan,

    Sorry for my delayed reply. Thanks! I'll check it out.

    -- webrunner

    -------------------
    A SQL query walks into a bar and sees two tables. He walks up to them and asks, "Can I join you?"
    Ref.: http://tkyte.blogspot.com/2009/02/sql-joke.html

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply