i am currently using the following script to display the computers that are pinging, i also want the script to display the ipaddress along with the results but the results are displayed not properly, i want the result to be displayed in a table or list format, what am i missing?
$ServerName = Get-Content "C:\scripts\com
puters.txt" foreach ($Server in $ServerName) { if (test-Connectio n -ComputerName $Server -Count 2 -Quiet) { "$Server is Pinging " } else {"$Server not pinging" } } foreach ($server in $servername) { Get-WmiObject -class "Win32_NetworkA dapterConfigura tion"|Select-Ob ject IPAddress|Forma t-List }
Powershell script for pinging computers from a text file and displaying output with ip address
February 6th, 2015 8:59pm