如何将 Get-WmiObject 命令转换为数组并将其添加到组合框?
这是命令行:
Get-WmiObject -Query "select DeviceID from win32_diskdrive" | Select-Object -ExpandProperty DeviceID | ft -HideTableHeaders -AutoSize | Out-String
这是输出结果:
\.\物理驱动0
\.\物理驱动1
我想这样写
"\.\PHYSICALDRIVE0","\.\PHYSICALDRIVE1"
谢谢您的帮助!