Get-UsbDevice

This cmdlet retrieves the USB devices available on a vCenter Server system. 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.

Syntax

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

Parameters

Required Parameter Name Type Position Features Description
optional
Template
Template[] 1
  • pipeline
  • Specifies the virtual machine templates whose virtual USB drives you want to retrieve.
    optional
    Snapshot
    Snapshot[] 2
  • pipeline
  • Specifies the virtual machine snapshots whose virtual USB you want to retrieve. Supported only on vCenter Server 4.1 and ESX 4.1 and later.
    optional
    Id
    String[] named
  • wildcards
  • Specifies the IDs of the USB devices you want to retrieve.
    optional
    Name
    String[] named
  • wildcards
  • Specifies the names of the USB devices you want to retrieve.
    optional
    Server
    VIServer[] named
  • wildcards
  • Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is provided or $null value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer.
    optional
    VM
    VirtualMachine[] named
  • pipeline
  • Specifies the virtual machines whose virtual USB drives you want to retrieve.

    Output

    VMware.VimAutomation.ViCore.Types.V1.VirtualDevice.UsbDevice

    Examples


    Example 1

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

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

    Related Commands

    Feedback

    Was this page helpful?