# 個人用証明書ストアに生成
$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
More than 5 years have passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme