I am looking to use PowerShell to gather information about several hosts, and display the information in a table. I have the logic down to gather the information, and sort the machines into 3 arrays based on the results, but can't figure out how to get them into a table type view.
Here the basic idea,
Script gathers list of hosts
Pings host, if no response add machine name to $noping
If it is pingable, searches for an active process, if the process is there add it to $running
If process is not there add it to $complete
This is all in a loop that checks every 5 minutes and all of that works fine if I just print the list lengthwise.
I would like to print it in 3 columns, i.e.
Completed Running No Pingy
Host1 Host3 Host9
Then when it runs again in the loop it will clear the screen and display the current status.
Can't think of a way to do it though.
Is there any simple way to accomplish a manual table with column1 containing the contents of an array/string, column2 the contents of a different array, etc?