【问题标题】:Generating a list of all self-signed certs for multiple machines in an enviroment?为环境中的多台机器生成所有自签名证书的列表?
【发布时间】:2019-09-25 18:04:29
【问题描述】:

我正在尝试使用 Powershell 在环境中生成所有自签名证书的列表。

我需要将脚本的这一部分(如下所示)定向到多台机器(IP 地址),但我不知道该怎么做:

dir cert: -Recurse |
where {$_.subject -ne $null} |
where {$_.subject -eq $_.issuer} |
Export-Csv -NoTypeInformation -Encoding UTF8 -delimiter ';' -path .\ssc_export

任何见解将不胜感激!

【问题讨论】:

标签: powershell security network-programming


【解决方案1】:

您是否尝试过带有 scriptblock 参数的 Invoke-Command ? https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/invoke-command?view=powershell-6

Invoke-Command -Computer <RemoteMachine> -ScriptBlock { <Your script here> }

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-03-08
    • 1970-01-01
    • 2019-04-18
    • 2014-04-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多