$servers=Get-Content H:\comp.txt
foreach($server in $servers){
$total=(Get-Process -ComputerName $server -Name chrome ).count
if($total -ge 20)
{
$server
}
}
2 Answers
Get-Process : 无法连接到远程计算机。
所在位置 行:4 字符: 20
+ $total=(Get-Process <<<< -ComputerName $server -Name chrome ).count
+ CategoryInfo : NotSpecified: (:) [Get-Process], InvalidOperationException
+ FullyQualifiedErrorId : System.InvalidOperationException,Microsoft.PowerShell.Commands.GetProcessCommand