I am trying to get computer information from remote computers using the following. However, it errors out. Maybe someone can point me in the right direction or tell me what I am doing wrong.
$computers = Get-Content -Path “list.txt”
Get-WmiObject -Class Win32_ComputerSystem $computers
Pause
This is the error:
Get-WmiObject : Invalid query "Select Computer 1, computer 2, Etc.
It does list all the computers from the list.txt file.