# Retrieve USB storage devices using PNPDeviceID $usbDevices = Get-PnpDevice | Where-Object { $_.PNPDeviceID -like "USBSTOR*" } # Format and display the relevant information for each USB storage device $usbDevices | ForEach-Object { [PSCustomObject]@{ DeviceID = $_.PNPDeviceID FriendlyName = $_.FriendlyName Status = $_.Status } } | Format-Table -AutoSize