Hello, I am trying to get the machine name, with the NIC information such as interfacealias, ipaddress, and a status of about 30 servers in a vlan. I got to 2 basic commands that do it separately, but they either overwrite the text file, and not get it all in one basically… I am thinking of running it using the invoke-command cmdlet…
Invoke-Command -ComputerName (Get-Content C:\PowerShell\servers.txt) -FilePath C:\PowerShell\NicServersStatus.ps1
Content of the .ps1 is something like -
Get-WmiObject -Class Win32_ComputerSystem | ft Domain, Name | out-file -filepath \xxx.xxx.xxx.xxx\c$\test\11.15.2013.txt
Get-NetAdapter | Get-NetIPAddress -ea 0 | ft interfacealias, ipaddress | out-file -filepath \xxx.xxx.xxx.xxx\c$\test\11.15.2013.txt
But I am kind of stuck, anyone has any good ideas of how to get it done?