How can I convert a Get-WmiObject command to an array and add it to a combobox?
This is the command line:
Get-WmiObject -Query "select DeviceID from win32_diskdrive" | Select-Object -ExpandProperty DeviceID | ft -HideTableHeaders -AutoSize | Out-String
And this is the output result:
\.\PHYSICALDRIVE0
\.\PHYSICALDRIVE1
I would like to write this like
"\.\PHYSICALDRIVE0","\.\PHYSICALDRIVE1"
Thanks for the help!