On Windows 10 I use successfully: $subject = "something" All without having to go through the joy of obtaining MakeCert.I need to create a self-signed certificate for SSL connections to an IIS-App on a Windows Server 2012 R2 with Powershell 5.1 installed. You'll now have your exported self signed certificate. For example Export-PfxCertificate -cert cert:\localMachine\my\CE0976529B02DE058C9CB2C0E64AD79DAFB18CF4 -FilePath e:\temp\cert.pfx -Password $pwd Once you've done that, use the Export-PfxCertificate cmdlet with the thumbprint generated when you created the certificate to export the certificate from the local certificate store. Use something similar to the following to do this: $pwd = ConvertTo-SecureString -String "Pa$$w0rd" -Force -AsPlainText Next you need to populate a variable with a password you'll use when exporting the certificate from the local certificate store. When you run the command, you'll also get a certificate thumbprint that will look something like CE0976529B02DE058C9CB2C0E64AD79DAFB18CF4 Running that command will add the self signed certificate to the local certificate store. You then use the command New-SelfSignedCertificate -certstorelocation cert:\localmachine\my -dnsname The way you use them is as follows.įirst - you need the FQDN that you want to use for the certificate. The commands you need are New-SelfSignedCertificate and Export-PfxCertificate. Rather than using Makecert.exe, you can use PowerShell. (though in my defense the Microsoft Azure documentation still references makecert.exe as well) Lo and behold it did with the release of Windows 8.1 and Server 2012 R2 - I just didn't notice until now. I hoped that at some point the ability to create self signed certs would crop up in the Windows operating system. When I was writing about setting up an Azure management certificate in various MS Press books, one of the most complex parts was explaining how someone could get MakeCert.exe and use it to create the certificate. Obtaining MakeCert involved jumping through a number of hoops. Prior to PowerShell 4.0, you needed to download MakeCert.exe or another utility to create self signed certificates.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |