电源外壳脚本以获取远程服务器证书

发布于 2025-01-30 12:59:39 字数 397 浏览 2 评论 0原文

我有200多个服务器,我正在使用此脚本在每个服务器上获取SSL证书。但是,我希望从每个服务器中获取信息并导出到CSV。

Get-ChildItem -Path cert:\LocalMachine\My, cert:\LocalMachine\WebHosting `
  -SSLServerAuthentication | Where-Object -FilterScript {((Get-Date))} | format-list -Property PSPath,FriendlyName,NotAfter

我想到将其添加到脚本的顶部

$remotecomputers = "Server_Name","Server_Name","Server_Name"

I have over 200 servers and I am using this script to get the SSL certificates on each server. However, I am looking to get the info from each server and export to a csv.

Get-ChildItem -Path cert:\LocalMachine\My, cert:\LocalMachine\WebHosting `
  -SSLServerAuthentication | Where-Object -FilterScript {((Get-Date))} | format-list -Property PSPath,FriendlyName,NotAfter

I thought of adding adding this to the top of script

$remotecomputers = "Server_Name","Server_Name","Server_Name"

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文