Powershell Script Running Slowly

前端 未结 4 1455
眼角桃花
眼角桃花 2021-01-28 07:46

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 = @(\"com         


        
4条回答
  •  不要未来只要你来
    2021-01-28 08:04

    There are a couple ways you could improve performance. PowerShell WorkFlow supports ForEach in parallel, which would hit each computer simultaneously. You could also use Get-WMIObject with -ComputerName to query the list of computers. Get-WMIObject also supports the -AsJob switch, which could also help.

提交回复
热议问题