This is a quick and dirty way of retrieving the self-signed SSL certificate that Exchange 2007 servers use out of the box. Get-ExchangeCertificate only works locally on the box that has the certificate…not fun when you have a long list to find out so you can build a list for renewing them. This uses psexec to connect to the remote server and retrieve any personal certificates and display the expiration date. Short and sweet.
1 |
.\psexec \\server cmd /c "echo . | powershell (gci -path cert:\localmachine\my).notafter" |
Scott, you rock! …but where is the code listed? or is Get-‘ExchangeCertificate’ the complete command?