Skip to content

Commit 4db767a

Browse files
authored
Update app-only-auth-powershell-v2.md
Add '-KeySpec KeyExchange' parameter to New-SelfSignedCertificate Cmdlet. The current syntax of New-SelfSignedCertificate Cmdlet will generate CNG certificate which is not supported. As an one of workarounds to prevent this behavior, we need to add the KeySpec parameter.
1 parent 6af6817 commit 4db767a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

exchange/docs-conceptual/app-only-auth-powershell-v2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ Create a self-signed x.509 certificate using one of the following methods:
149149

150150
```powershell
151151
# Create certificate
152-
$mycert = New-SelfSignedCertificate -DnsName "example.com" -CertStoreLocation "cert:\LocalMachine\My" -NotAfter (Get-Date).AddYears(1)
152+
$mycert = New-SelfSignedCertificate -DnsName "example.com" -CertStoreLocation "cert:\LocalMachine\My" -NotAfter (Get-Date).AddYears(1) -KeySpec KeyExchange
153153
154154
# Export certificate to .pfx file
155155
$mycert | Export-PfxCertificate -FilePath mycert.pfx -Password $(ConvertTo-SecureString -String "1234" -Force -AsPlainText)

0 commit comments

Comments
 (0)