Last active
July 4, 2017 23:39
-
-
Save sdurandeu/5377235fb8a1e6552add to your computer and use it in GitHub Desktop.
Create self-signed certificates for Azure
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
| // for azure web sites | |
| makecert -r -pe -b 01/01/2013 -e 01/01/2014 -eku 1.3.6.1.5.5.7.3.1 -ss My -n CN=serverdnsname -sky exchange -sp "Microsoft RSA SChannel Cryptographic Provider" -sy 12 -len 2048 | |
| // This will install it in current user | |
| // Then export the PFX from MMC (do not run pvktopfx!) | |
| // for remote desktop for cloud services (powershell) | |
| $cert = New-SelfSignedCertificate -DnsName mysite.cloudapp.net -CertStoreLocation "cert:\LocalMachine\My" | |
| $password = ConvertTo-SecureString -String "your-password" -Force -AsPlainText | |
| Export-PfxCertificate -Cert $cert -FilePath ".\tryazurecdnworker-westus-dev.pfx" -Password $password |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment