Skip to main content

Creating Self Signed SSL Certificate

You can create a Self Signed SSL Certificate using below PowerShell commands,

  • `Create NEW SSL certificate PS C:\Windows\system32> New-SelfSignedCertificate -DnsName "10.0.0.80" -CertStoreLocation "cert:\LocalMachine\My"

   PSParentPath: Microsoft.PowerShell.Security\Certificate::LocalMachine\My

Thumbprint                                Subject

----------                                -------

B8400DB79231966F888B11D1094D4B8408D7B891  CN=10.0.0.80

  • `Setup a Strong Password for the SSL Certificate

PS C:\Windows\system32> $pwd = ConvertTo-SecureString -String "Setup your password here" -Force -AsPlainText

  • `Export the Certificate to a compatible version for IIS, (Provide a Directory to store the certificate)

PS C:\Windows\system32> Export-PfxCertificate -Cert cert:\LocalMachine\My\B8400DB79231966F888B11D1094D4B8408D7B891 -FilePath D:\WfD\SSL\100080_SelfSigned.pfx -Password $pwd

    Directory: D:\WfD\SSL

Mode                LastWriteTime         Length Name

----                -------------         ------ ----

-a----       09/10/2023     15:38           2629 100080_SelfSigned.pfx