Get-USBDisk

OSD 21.2.22+

This easily converts Get-OSDDisk to return only drives with a USB BusType. Keep in mind this is USB only, and I expect there should be a Get-RemovableDisk to include SD or MMC types

Get-OSDDisk -BusType USB

Get-Help

PS C:\> Get-Help Get-USBDisk -Detailed

NAME
    Get-USBDisk
    
SYNOPSIS
    Returns Get-Disk + MediaType with BusType USB
    
    
SYNTAX
    Get-USBDisk [[-Number] <UInt32>] [<CommonParameters>]
    
    
DESCRIPTION
    Returns Get-Disk + MediaType with BusType USB
    

PARAMETERS
    -Number <UInt32>
        Specifies the disk number for which to get the associated Disk object
        Alias = Disk, DiskNumber
        
    <CommonParameters>
        This cmdlet supports the common parameters: Verbose, Debug,
        ErrorAction, ErrorVariable, WarningAction, WarningVariable,
        OutBuffer, PipelineVariable, and OutVariable. For more information, see 
        about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216). 
    
REMARKS
    To see the examples, type: "get-help Get-USBDisk -examples".
    For more information, type: "get-help Get-USBDisk -detailed".
    For technical information, type: "get-help Get-USBDisk -full".
    For online help, type: "get-help Get-USBDisk -online"

Last updated