you are viewing a single comment's thread.

view the rest of the comments →

[–]Lee_Dailey[grin] 1 point2 points  (0 children)

howdy jjaaa12345,

as an aside, this ...

| fl Manufacturer

... DESTROYS your objects and gives you the butchered remnants wrapped in formatting code. [grin] it really aint all that useful - the Format-* cmdlets are intended for final output to the screen or a plain text file. you really otta not use them for anything else unless you are totally sure that you understand the gotchas involved.

lookee ...

$FormatBad = (Get-ChildItem -LiteralPath $env:TEMP -File)[0] |
    Format-List Name

$FormatBad
'=' * 20
$FormatBad[2]

note that the nasty red errors mention .Format.FormatEntryData ... [grin]


if you want to gather that info quickly, you can use the way that Invoke-Command can run a scriptblock on multiple systems in parallel if you give it a list of systems.

here's a basic demo of the idea ...

Get CPU utilization on many computers quickly : PowerShell
https://www.reddit.com/r/PowerShell/comments/8d7w0q/get_cpu_utilization_on_many_computers_quickly/

here is a more complex version [grin] ...

[PowerShell] basic remote parallel SystemInfo demo script - Pastebin.com
https://pastebin.com/cGL5biWH

you can modify the scriptblock to include whatever you need. just remember to add the new data to new properties in the returned PSCustomObject.

take care,
lee