| 
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
# 証明書ストアのパス確認
PS C:\Users\Administrator> Get-PSDrive | Format-Table -AutoSize -Wrap 
Name     Used (GB) Free (GB) Provider    Root                 CurrentLocation
----     --------- --------- --------    ----                 ---------------
Alias                        Alias
C            14.71    104.67 FileSystem  C:\                Users\serverworld
Cert                         Certificate \
D                            FileSystem  D:\
Env                          Environment
Function                     Function
HKCU                         Registry    HKEY_CURRENT_USER
HKLM                         Registry    HKEY_LOCAL_MACHINE
Variable                     Variable
WSMan                        WSMan
# 自己署名証明書を作成
# -DnsName (DNS名)
# -KeyAlgorithm (RSA | ECDSA)
# -KeyLength (鍵長)
# -CertStoreLocation (証明書ストア)
# -NotAfter (有効期間 : 下例は 10年)
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
----------                                -------
99E0FDC7DBA905320BF746FD0BF09E8904FF0186  CN=rx-7.srv.world
 |