windows:powershell_commands:x.509_certificate

no way to compare when less than two revisions

Differences

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


windows:powershell_commands:x.509_certificate [2019/10/31 09:06] (current) – created - external edit 127.0.0.1
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>