LogoLogo
OSDeploy.comTwitterGitHubPowerShell Gallery
  • OSD PowerShell Module
  • Functions
  • Docs
    • OSDCloud
    • OSDPad
    • OSDHelp
      • Autopilot
    • Guides
      • UEFI System Firmware Update
      • In Your Code
      • New-OSDBoot.usb
      • Partitions
        • New-OSDDisk (Information)
        • New-OSDDiskWinPE (GPT)
        • New-OSDDiskWinPE (2 Disks)
        • AutoUnattend.xml
    • OSDWindowsImage
    • Windows Setup Environment
      • Execution Policy
      • WinSE Settings
      • Import Modules
      • Automation
    • Release Notes
    • Trash
      • Adk
        • Edit-ADKwinpe.wim
        • Get-ADKpaths
        • New-ADK.iso
        • New-ADKcopype
      • Appx
      • Block
      • CloudDriver
      • Dell
        • Get-DellCatalogPC
        • Get-MyDellBIOS
        • Update-MyDellBios
      • Disk
        • Backup-Disk.ffu
        • Clear-LocalDisk
        • Clear-USBDisk
        • Get-LocalDisk
        • Get-OSDDisk
        • Get-USBDisk
        • New-OSDisk
          • Old Version
            • Sandbox
            • Partition Layout
            • Partition Sizes
            • Volume Labels
            • AutoUnattend.xml
        • Get-USBVolume
      • Dism
        • Get-MyWindowsCapability
        • Get-MyWindowsPackage
        • Set-WimExecutionPolicy
        • Set-WindowsImageExecutionPolicy
      • Display
        • Get-VidConRes
      • Driver
        • Get-OSDDriverWmiQ
        • Get-OSDDriver
      • General
        • Get-OSD
        • Get-OSDClass
        • Get-OSDGather
        • Get-OSDPower
        • Get-RegCurrentVersion
        • Get-SessionsXml
        • Save-OSDDownload
      • MyBitLocker
        • Get-MyBitLockerKeyProtectors
        • Backup-MyBitLocker
        • Save-MyBitLockerExternalKey
        • Save-MyBitLockerKeyPackage
        • Save-MyBitLockerRecoveryPassword
        • Unlock-MyBitLockerExternalKey
      • OOBE
      • PSModule
        • Copy-PSModuleToFolder
        • Copy-PSModuleToWim
        • Copy-PSModuleToWindowsImage
      • WebConnection
      • WebPSScript
      • WinPEWim
      • WinPE
        • Enable-PEWimPSGallery
        • Get-OSDWinPE
Powered by GitBook
On this page

Was this helpful?

  1. Docs
  2. Trash
  3. Disk

Get-USBDisk

OSD 21.2.22+

PreviousGet-OSDDiskNextNew-OSDisk

Last updated 4 years ago

Was this helpful?

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"