Get-USB – Using WMI Association Classes in PowerShell
Synopsis:
Gets USB devices attached to the system
Detailed Description:
Uses WMI to get the USB Devices attached to the system
Examples:
-------------------------- EXAMPLE 1 --------------------------
Get-USB
-------------------------- EXAMPLE 2 --------------------------
Get-USB | Group-Object Manufacturer
Here's Get-USB:
function Get-USB {
#.Synopsis
# Gets USB devices attached to the system
#.Description
# Uses WMI to get the USB Devices attached to the system
#.Example
# Get-USB
#.Example
# Get-USB | Group-Object Manufacturer
Get-WmiObject Win32_USBControllerDevice | Foreach-Object { [Wmi]$_.Dependent }
}
Automatically generated with Write-CommandBlogPost