Last active
November 14, 2020 14:50
-
-
Save valchetski/41a3413f55aaae59c67d296a6e06d5f5 to your computer and use it in GitHub Desktop.
GenerateCertificate.ps1
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 -certstorelocation cert:\localmachine\my -dnsname test.local | |
$password = ConvertTo-SecureString -String ‘password’ -Force -AsPlainText | |
$path = ‘cert:\localMachine\my\’ + $cert.thumbprint | |
Export-PfxCertificate -cert $path -FilePath D:\powershellcert.pfx -Password $password |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment