使用PowerShell从IIS导出证书 [英] Export certificate from IIS using PowerShell

查看:259
本文介绍了使用PowerShell从IIS导出证书的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用PowerShell从 IIS 7导出自签名证书?

How do I export a self-signed certificate from IIS 7 using PowerShell?

推荐答案

dir cert:\localmachine\my | Where-Object { $_.hasPrivateKey } |   Foreach-Object { [system.IO.file]::WriteAllBytes("c:\$($_.Subject).pfx",     ($_.Export('PFX', 'secret')) ) }

来源: 使用私钥导出证书

这会将所有证书导出到 C:\

This will export all of your certificates into C:\.

你可以检查一下通过运行证书:

You can check what certificates you have by running:

dir cert:\localmachine\my

这篇关于使用PowerShell从IIS导出证书的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆