out-gridview

Run multiple test-connection for one gridview output

风格不统一 提交于 2019-12-25 08:26:06
问题 How can I use multiple Test-Connection cmdlets and put them all in one Out-GridView , or is there another solution to what I'm trying to do here? The point is to be able to ping multiple adresses after one another and have it all appear in the same window. 回答1: Feed your list of IP addresses (or hostnames) into a ForEach-Object loop running Test-Connection for each address, then pipe the result into Out-GridView : $addr = '192.168.1.13', '192.168.23.42', ... $addr | ForEach-Object { Test