I try to export SharePoint Root Authority certificate, but get this error:
You cannot call a method on a null-valued expression.
At line:1 char:1
+ $rootCert.Export("Cert") | Set-Content c:\root.cer -Encoding byte
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
This is the command I run:
$rootCert = (Get-SPCertificateAuthority).RootCertificate $rootCert.Export("Cert") | Set-Content c:\root.cer -Encoding byte
Anyone who could help me out?
I got 3 certificates listed under MMC -> certificates -> sharepoint