Skip to content

[Doc]: Get-AzKeyVaultCertificate → "save as pfx" example broken #18251

@odegroot

Description

@odegroot

Description

"Example 2: Get cert and save it as pfx" does not work on my machine.

Specifically, the following command does nothing.

# Write to a file
[System.IO.File]::WriteAllBytes("cert.pfx", $secretByte)

I was able to fix the problem by using the following command instead (source):

Set-Content -Path "cert.pfx" -Value $secretByte -AsByteStream

Perhaps this would be a nice improvement to the docs?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions