Created
January 31, 2020 09:16
-
-
Save lansalot/976f0b69a7ecca31ce95ec9f28cbd59f to your computer and use it in GitHub Desktop.
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
$cert = New-SelfSignedCertificate -DnsName contoso.com -Type CodeSigning -CertStoreLocation Cert:\CurrentUser\My | |
# But if you try to sign, you'll get UnknownError because it's not in the trusted Root store. So do this to get it there | |
Export-Certificate -FilePath exported_cert.cer -Cert $cert | |
Import-Certificate -FilePath exported_cert.cer -CertStoreLocation Cert:\CurrentUser\Root |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment