Generating a certificate (self-signed) using powershell and CertEnroll interfaces

In this article I will explore using the certenroll interfaces to create certificates for testing/local usage. To scope the discussion, we would look at various options exposed via makecert.exe tool (http://msdn.microsoft.com/en-us/library/aa386968(VS.85).aspx .  We will start by looking at a sample powershell script that creates a self-signed machine certificate that has “server auth” eku: $name = new-object -com “X509Enrollment.CX500DistinguishedName.1″$name.Encode(“CN=TestServer”, 0) $key…

9