$computers=get-content"C:\scripts\class-lists\Test-Lab-Computers.txt"
foreach ($computerin$computers){
invoke-command-computer$pc-scriptblock {get-item c:\drc882c.log |
format-table-property @{ label="computername"; expression={$computer}}, name, length -autosize
}
}
foreach ($computerin$computers){
invoke-command-computer$pc-scriptblock {get-item c:\drc882c.log |
format-table-property @{ label="computername"; expression={$computer}}, name, length -autosize
}
}
I have a list of computers with about 30 computers in it. im trying to query each computer ,
and provide output that finds a file on each of those computers and returns the file name
and size and the computer it came from. I cant seem to get the "computername" field to
populate.. its blank.
been trying numerous ways and cant seem to get it the way I want... any suggestions?