Created
April 11, 2022 11:20
-
-
Save norman-bauer/c46c60336743b23e02e45356dae79472 to your computer and use it in GitHub Desktop.
Converts certificate installed in machine store to pem file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Install-Module -Name PSPKI | |
Import-Module -Name PSPKI | |
$cert = @(Get-ChildItem cert:\LocalMachine\My | Where-Object {$_.Subject -like "*CertificateSubject*"})[0] | |
Convert-PfxToPem -Certificate $cert -OutputFile "c:\temp\output.pem" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment