Skip to content

Instantly share code, notes, and snippets.

@Diom
Diom / .ps1
Last active May 5, 2017
Powershell VBoxManage List USBHost Covert To Object Array
View .ps1
$allUsbDevs = vboxmanage list usbhost | Out-String | %{$_ -replace ':','=' } | %{$_ -split '(?=UUID)'} | ConvertFrom-StringData | where{ $_.UUID -ne $null }
$uuidToUse = vboxmanage list usbhost | Out-String | %{$_ -replace ':','=' } | %{$_ -split '(?=UUID)'} | ConvertFrom-StringData | where{ $_.Product -eq "USB DISK 2.0"} | %{$_.UUID}