LoginSignup
1
4

More than 5 years have passed since last update.

PowerShell で自己証明書を生成

Posted at

# 個人用証明書ストアに生成
$cert = New-SelfSignedCertificate `
            -DnsName "server01", `
                     "server01.honsya.local", `
                     "server.artisan-kogyo.com" `
            -CertStoreLocation "cert:\LocalMachine\My" `
            -NotAfter (Get-Date).AddYears(100) #100年後に期限が切れるので忘れずに更新すること

# "C:\ServerCert.cer" にファイルとしてエクスポート
Export-Certificate -Cert $cert -FilePath "C:\ServerCert.cer"

# 証明書ストアをお掃除
Remove-Item $cert.PSPath

1
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
4