vSphere PowerCLI Reference

Get-UsbDevice

Synopsis

Retrieves the USB devices available on a vSphere server.

Syntax

Get-UsbDevice [[-VM] <VirtualMachine[]>] [[-Template] <Template[]>] [[-Snapshot] <Snapshot[]>] [-Id <String[]>] [-Name <String[]>] [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
Remove-UsbDevice

Detailed Description

Retrieves the USB devices available on a vSphere server. The cmdlet returns a set of virtual USB devices assigned to the virtual machines, templates, and snapshots specified by the VirtualMachine, Template, and Snapshot parameters. At least one of these parameters must be provided. To specify a server different from the default one, use the -Server parameter.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
VMVirtualMachine[]Specify the virtual machines whose virtual USB drives you want to retrieve.falsetrue (ByValue)
TemplateTemplate[]Specify the virtual machine templates whose virtual USB drives you want to retrieve.falsetrue (ByValue)
SnapshotSnapshot[]Specify the virtual machine snapshots whose virtual USB you want to retrieve. Supported only on vCenter Server 4.0 and ESX 4.0 and higher.falsetrue (ByValue)
IdString[]Specify the Id of the Usb devices you want to retrieve.falsefalse
NameString[]Specify the names of the Usb devices you want to retrieve.falsefalse
ServerVIServer[]Specify the vSphere servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer.falsefalse

Return Type

UsbDevice[]

Notes

The -Snapshot parameter is supported only on vCenter Server 4.0 and ESX 4.0 and higher.

Examples

-------------- Example 1 --------------

Get-UsbDevice -VM (Get-VM -Location Host)

Retrieves the USB devices attached to the virtual machines on the Host host.


Copyright © 1998 - 2012 VMware, Inc. All rights reserved.