powershell:“openssl x509 -in file.pem -text”相等的
我一定使用了错误的查询,因为我找不到如何在 Powershell 中执行我使用简单操作所做的操作:
openssl x509 -in file.pem -text
我猜 Powershell 提供了本机命令来显示证书详细信息,但我正在努力寻找方法。
I must be using the wrong query because I cannot find how to do in Powershell what I do with a simple:
openssl x509 -in file.pem -text
I guess Powershell provides native commands to show certificate details but I'm struggling in finding how.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
[X509Certificate]:: CreateFromCertFile()
方法 本机读取 Base64 编码的 DER 证书文件,并在 Windows PowerShell 和更新版本中工作:显式转换为
[X509Certificate2]
是经过深思熟虑的 - 它通过属性公开更多元数据,并在 PowerShell 中产生更好的默认输出格式The
[X509Certificate]::CreateFromCertFile()
method reads Base64 encoded DER cert files natively and works in both Windows PowerShell and newer versions:The explicit conversion to
[X509Certificate2]
is deliberate - it exposes more metadata via properties and results in nicer default output formatting in PowerShell