Windows 2019
Sponsored Link

Create SSL Certificate (Self Sign)2019/08/29

 
Create Self Signed SSL Certificate.
Self Signed SSL Certificate is for the purpose of development or testing, if you use your server as a business, it had better buy and use a Formal Certificates.
[1] Run PowerShell with Admin Privilege and work.
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

# make sure certificates stored PATH
PS C:\Users\Administrator> Get-PSDrive | Format-Table -AutoSize -Wrap 

Name     Used (GB) Free (GB) Provider    Root                   CurrentLocation
----     --------- --------- --------    ----                   ---------------
Alias                        Alias
C            14.65     64.81 FileSystem  C:\                    Users\Administrator
Cert                         Certificate \
Env                          Environment
Function                     Function
HKCU                         Registry    HKEY_CURRENT_USER
HKLM                         Registry    HKEY_LOCAL_MACHINE
Variable                     Variable
WSMan                        WSMan

# create self signed certificate
# -DnsName (DNS name)
# -KeyAlgorithm (RSA | ECDSA)
# -KeyLength (Key Length)
# -CertStoreLocation (certificate store PATH)
# -NotAfter (valid term : the example below is 10 years)
PS C:\Users\Administrator> New-SelfSignedCertificate `
-DnsName "rx-7.srv.world" `
-KeyAlgorithm RSA `
-KeyLength 2048 `
-CertStoreLocation "Cert:\LocalMachine\My" `
-NotAfter (Get-Date).AddYears(10) 

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

Thumbprint                                Subject
----------                                -------
8F34D5F95B3283273D54EA187FFF314CBEB09920  CN=rx-7.srv.world
[2] If you'd like to see the your self signed certificate on GUI, run [Run] and input [certlm.msc].
[3] If you created self signed certificate like this example [Cert:\LocalMachine\My], it is stored under [Personal] - [Certificate].
Matched Content