Eureka Moment Wiki

One eureka moment at the time

User Tools

Site Tools


windows:powershell_commands:x.509_certificate

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

windows:powershell_commands:x.509_certificate [2019/10/31 09:06] (current)
Line 1: Line 1:
 +====== Create X.509 certificate via Powershell ======
 +<code powershell>​
 +PS E:​\Certificates>​ new-selfsignedcertificate -certstorelocation cert:​\localmachine\my -dnsname www.example.com -NotAfter 2100.12.31
 +
 +
 +   ​PSParentPath:​ Microsoft.PowerShell.Security\Certificate::​LocalMachine\my
 +
 +Thumbprint ​                               Subject
 +---------- ​                               -------
 +6B56F00AA1EB7C981614072D6BBB89F292D3A0BA ​ CN=www.example.com
 +
 +
 +PS E:​\Certificates>​ $pwd = ConvertTo-SecureString -String "​GCgcPIN**1"​ -Force -AsPlainText
 +PS E:​\Certificates>​ Export-PfxCertificate -cert cert:​\localMachine\my\6B56F00AA1EB7C981614072D6BBB89F292D3A0BA -FilePath e:​\Certificates\Client.pfx -Password $pwd
 +
 +
 +    Directory: E:​\Certificates
 +
 +
 +Mode                LastWriteTime ​        ​Length Name
 +----                ------------- ​        ​------ ----
 +-a---- ​      ​09/​27/​2017 ​    ​10:​54 ​          2725 Client.pfx
 +
 +
 +PS E:​\Certificates>​
 +</​code>​
  
windows/powershell_commands/x.509_certificate.txt · Last modified: 2019/10/31 09:06 (external edit)