J2897 icon

Get-USBStorageDevicesInfo

J2897 | PRO | 04/02/25 03:11:34 PM UTC (Edited) | 0 ⭐ | 8363 👁️ | Never ⏰ | []
PowerShell |

400 B

|

None

|

0 👍

/

0 👎

# 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

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎