0

I'm trying to create a self-signed certificate using power shell. I have tried using import-module PKI but seems like it's supported on powershell v3.0 onward .Is any other way I could create a self-signed certificate using powershell v2.0?

1
  • 2
    Is there any specific reason to stick with PowerShell 2.0?
    – Crypt32
    Sep 18, 2016 at 5:40

2 Answers 2

1

you could download the Windows SDK and use MakeCert

3
  • Please, read the page header in the referenced link. Makecert.exe is deprecated.
    – Crypt32
    Sep 17, 2016 at 19:25
  • since he using Windows 2008 and powershell 2, makecert will work just fine. @CryptoGuy. Sep 17, 2016 at 21:16
  • This one would be better: gallery.technet.microsoft.com/scriptcenter/…. Makecert.exe was deprecated due to extremely weak and outdated cryptography. It was the solution in pre-Vista era, but things changed in Vista/2008 when they got completely new cryptography subsystem.
    – Crypt32
    Sep 18, 2016 at 5:35
-1

Have you tried this?

New-SelfSignedCertificate -DnsName 'www.fabrikam.com', 'www.contoso.com' -CertStoreLocation 'cert:\LocalMachine\My'
2
  • 2
    New-SelfSignedCertificate this command works on powershell v3.0 onward. Aug 10, 2016 at 10:54
  • Also on Windows 2008R2, this command did not work even with PowerShell 3.0 (or 4.0, or 5.x)
    – AntoineL
    Dec 11, 2023 at 15:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .