#PSTip Generating a self-signed certificate

Self-signed certificates might be needed for different purposes, such as the test environments. A more practical example is Azure Recovery Services where self-signed certificates can be used as vault certificates.

Many online articles suggests using the MakeCert.exe tool available in the Windows SDK for creating a self-signed certificate, but now there is an easier approach available.

Introduced in Windows 8.1 and Windows Server 2012 R2, the Public Key Infrastructure (PKI) Client module offers the New-SelfSignedCertificate cmdlet to create a self-signed certificate.

New-SelfSignedCertificate -DnsName test.powershellmagazine.com -CertStoreLocation cert:\LocalMachine\My
Share on: