Powershell Script Running Slowly
问题 I'm writing a script to check the version on about 15 remote servers and the script is taking much longer to execute than I would expect. $listServers = @("compName1", "compName2", "compName3", ... "compName15") "" | Out-File C:\temp\javaVersion.txt "" | Out-File C:\temp\javaVersionLog.txt $cred = Get-Credential ForEach ($server in $listServers) { Measure-Command {$javaVersion = Invoke-Command -ComputerName $server -Credential $cred -Authentication Kerberos -ScriptBlock {Get-WmiObject -Class