Microsoft IIS 10.0 – Using PowerShell commands to create SSL certificates

How to configure nginx for wordpress

In this recipe, we are going to open IIS Manager on WIN2016IIS. We will open PowerShell and create an SSL certificate called We will also verify that the certificate has been created through IIS Manager.

Getting ready

To step through this recipe, we are going to create an SSL certificate for We will use PowerShell to create a self-signed certificate. You will need a running IIS 10.0 server and an administrator account to make changes in IIS 10.0.

How to do it…

  1. Log in to Windows Server 2016. The IP is and the name of the server is WIN2016IIS.
  2. Press Windows + R. You will get the Run window. Open PowerShell ISE with administrative rights, type RunAs /user:Administrator PowerShell_ISE.exe in the run command window, and press OK.
  3. Now it will ask you for the administrator password of server WIN2916IIS. Type the administrator password and press Enter. The PowerShell window will open. Now you have to type New-SelfSignedCertificate -DnsName -CertStoreLocation cert:\LocalMachine\My, as shown here:
  1. You can see in the PowerShell window that the certificate has been created. It is a self-signed certificate.
  2. Let’s open IIS Manager. Click on the WIN2016IIS server, and you’ll see the Server Certificates.



  1. Open the Server Certificates window from the Features pane, as shown here:
  1. Here you can see the self-signed certificate listed.

How it works…

In this recipe, we opened IIS Manager on WIN2016IIS. We opened PowerShell and created a SSLself-signed certificate called We verified that the self-signed certificate has been created.

Comments are closed.