Posts

Showing posts with the label SelfSigned Certificate

Creating a SelfSigned Certificate using Powershell

Most of the time I get my certificates from an Active Directory CA but there are times when I want a temporary certificate to test something, like in a lab for example. With the following commands, you can create and export a self signed certificate: To create the certificate at the Personal store of Local Machine use: New-SelfSignedCertificate -DnsName server.lab.local -CertStoreLocation Cert:\localmachine\my   In most cases, like IIS, you should be ready to assign the certificate to your application server by now. In case you want to export the certificate in PFX format (that included the private key), use the following cmdlets: First, you'll need the thumbprint of the certificate from the above command, so save the output to a variable like:     $Certificate = New-SelfSignedCertificate -DnsName server.lab.local -CertStoreLocation Cert:\localmachine\my   Please note that if you have already created the ce...