Skip to content

Commit 2daf143

Browse files
authored
Merge pull request MicrosoftDocs#3360 from ykuijs/patch-1
Corrected private key requirement
2 parents aff2375 + 60307f9 commit 2daf143

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

sharepoint/sharepoint-ps/sharepoint-server/Set-SPTrustedRootAuthority.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Set-SPTrustedRootAuthority [-Identity] <SPTrustedRootAuthorityPipeBind>
3232

3333
## DESCRIPTION
3434
The `Set-SPTrustedRootAuthority` cmdlet creates a new trusted root authority.
35-
If a certificate file is used, the certificate must be an X509 certificate with private keys, otherwise an exception is raised.
35+
If a certificate file is used, the certificate must be an X509 certificate without private keys, otherwise an exception is raised.
3636

3737
For permissions and the most current information about Windows PowerShell for SharePoint Products, see the online documentation at [SharePoint Server Cmdlets](https://docs.microsoft.com/powershell/sharepoint/sharepoint-server/sharepoint-server-cmdlets).
3838

@@ -41,8 +41,9 @@ For permissions and the most current information about Windows PowerShell for Sh
4141

4242
### ------------------EXAMPLE------------------
4343
```
44-
C:\PS>$cert = Get-PfxCertificate C:\LiveIDSigningCert.pfx
45-
Get - SPTrustedRootAuthority -Name "WFEFarm1" | Set- SPTrustedRootAuthority -Certificate $cert
44+
C:\PS>$cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2
45+
$cert.Import('C:\LiveIDSigningCert.pfx')
46+
Get-SPTrustedRootAuthority -Name "WFEFarm1" | Set-SPTrustedRootAuthority -Certificate $cert
4647
```
4748

4849
This example updates the certificate of the trusted root authority WFEFarm1.

0 commit comments

Comments
 (0)