Welcome › Forums › General PowerShell Q&A › Running Get-ExchangeCertificate using a remote session.
- This topic has 2 replies, 2 voices, and was last updated 3 months, 3 weeks ago by
Participant.
-
AuthorPosts
-
-
October 1, 2020 at 3:51 pm #260379
I am writing a PowerShell script to take an automated backup of the Exchange environment.
In the process of doing that i need to run “Get-ExchangeCertificate | select Thumbprint, Services, CertificateDomains” and get “certificate domains” and other fields from an Exchange 2016 Environment.If I run this command via the “Exchange management shell” the command works fine and displays the “certificate domains”.
But If I were run PowerShell and connect to the on-premises environment (New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri “http://$ExchServ/powershell” -Authentication Kerberos), run the same Get-ExchangeCertificate command as above, the “certificate domains” shows BLANK.
How can I get it to show the field with a remote session. -
October 1, 2020 at 5:21 pm #260400
I answered a similar question on Reddit three days ago.
Trouble getting Exchange certificate information remotely, looking for workaround from PowerShell
There is a script written that will import the full exchange environment. It will allow Get-ExchangeCertificate to return the certificate domains property remotely.
https://gallery.technet.microsoft.com/Import-ModuleExchange-010da141
-
October 1, 2020 at 8:22 pm #260427
Thanks Doug. That was exactly what I needed. Worked like a charm !!!!!!!
I answered a similar question on Reddit three days ago.
Trouble getting Exchange certificate information remotely, looking for workaround from PowerShell
There is a script written that will import the full exchange environment. It will allow Get-ExchangeCertificate to return the certificate domains property remotely.
https://gallery.technet.microsoft.com/Import-ModuleExchange-010da141
-
-
AuthorPosts
- The topic ‘Running Get-ExchangeCertificate using a remote session.’ is closed to new replies.