Would you like to learn how to create a self-signed certificate using Powershell? In this tutorial, we are going to show you how to create a self-signed certificate on a computer running Windows.

• Windows 2012 R2
• Windows 2016
• Windows 2019
• Windows 2022
• Windows 10
• Windows 11

Equipment list

Here you can find the list of equipment used to create this tutorial.

This link will also show the software list used to create this tutorial.

Windows Related Tutorial:

On this page, we offer quick access to a list of tutorials related to Windows.

Tutorial Windows – Create a self-signed certificate

As an Administrator, start a new POWERSHELL command-line prompt.

Windows 10 - powershell elevated

Create a self-signed certificate using Powershell

Copy to Clipboard

List the certificates in the machine personal store.

Copy to Clipboard

Here is the command output.

Copy to Clipboard

Export the public key of the certificate.

Copy to Clipboard

Here is the command output.

Copy to Clipboard

Import this certificate as a trusted root certification authority.

Copy to Clipboard

Here is the command output.

Copy to Clipboard

Access the certificate file and verify if the system trusts it.

Windows - Create self-signed certificate

Congratulations! You are able to create a self-signed certificate on Windows.

Tutorial Powershell – Self-signed certificate commands

Generate a self-signed certificate with multiple alternative names.

Copy to Clipboard

Export the public and private keys of the certificate to a protected file.

Copy to Clipboard

Congratulations! You are able to create a self-signed certificate on Windows.