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.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
# 自己署名証明書を作成
# -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
---------- -------
8F34D5F95B3283273D54EA187FFF314CBEB09920 CN=rx-7.srv.world
|