我想知道这个 Bash 命令是否可以转换为 PowerShell:
openssl s_client -showcerts -connect host:port </dev/null 2>/dev/null | openssl x509 -noout -dates
Run Code Online (Sandbox Code Playgroud)
当前脚本(不起作用):
.\openssl s_client -showcerts -connect host:port 2>$null | .\openssl x509 -noout -dates
Run Code Online (Sandbox Code Playgroud)
缺失</dev/null使其无限等待输入。该语法是否有 PowerShell 替代方案?
<$null不起作用,因为<保留供将来使用。
有什么建议么?