Last active
June 2, 2016 11:06
-
-
Save slavaceornea/d4ce526ae87832fb6473c8c79cf7b920 to your computer and use it in GitHub Desktop.
Powershell script creates and exports self-signed certificate as .pfx file.
This file contains 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
New-SelfSignedCertificate -certstorelocation cert:\localmachine\my -dnsname selfsignedcertificate.internal | |
# change Pa$$word with your own | |
$pwd = ConvertTo-SecureString -String "{Pa$$word}" -Force -AsPlainText | |
# in between parantheses on the next line use the ID you get by running the first command | |
Export-PfxCertificate -cert Cert:\localMachine\my\{15034633B1C5D9FB68EAD7984B7816C1D73D27E2} -FilePath c:\temp\selfsignedcertificate.internal.pfx -Password $pwd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment