Skip to content

Commit f11f9a9

Browse files
Merge pull request #213115 from MarileeTurscak-MSFT/patch-905
Updated obsolete Powershell
2 parents 8975a79 + 8b29e82 commit f11f9a9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

articles/key-vault/certificates/how-to-export-certificate.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,7 @@ try {
8989
[System.Runtime.InteropServices.Marshal]::ZeroFreeBSTR($ssPtr)
9090
}
9191
$secretByte = [Convert]::FromBase64String($secretValueText)
92-
$x509Cert = new-object System.Security.Cryptography.X509Certificates.X509Certificate2
93-
$x509Cert.Import($secretByte, "", "Exportable,PersistKeySet")
92+
$x509Cert = new-object System.Security.Cryptography.X509Certificates.X509Certificate2($secretByte,'','Exportable,PersistKeySet')
9493
$type = [System.Security.Cryptography.X509Certificates.X509ContentType]::Pfx
9594
$pfxFileByte = $x509Cert.Export($type, $password)
9695

0 commit comments

Comments
 (0)