I’m having a real problem here.
Take this code:
Get-WmiObject Win32_ComputerSystemProduct -ComputerName summer | Select Vendor,Version,Name,IdentifyingNumber,UUID
I’m trying to get the above Get-WMIobject that has been piped into a Datagridview with the data output the same as you’d see it if it was run via the console directly.
For some reason, it keeps being outputted into the DatagridView, with the columns of Vendor, Version etc. showing what seems to be the directory path or some such data that I don’t want.
Try it for yourself in a console, that how I want it to be outputted.
This is the datagridview I’m using:
$arrayt = New-Object System.Collections.ArrayList
$global:target_active_d = Get-WmiObject Win32_ComputerSystemProduct -ComputerName $target_hostname.text | get-member Vendor,Version,Name,IdentifyingNumber,UUID
$arrayt.AddRange($target_active_d)
$target_output.DataSource = $arrayt
Please help
Thanks!
Try something like this: