powershellscripts.com

Tutorials  PowerShell Cmdlet Help for Get-UsbDevice



NAME
Get-UsbDevice

SYNOPSIS
Retrieves the USB devices available on a vSphere server.

SYNTAX
Get-UsbDevice [[-VM] ] [[-Template] ] [[-Snapshot] ] [-Id ] [-N
ame ] [-Server ] []


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


PARAMETERS
-VM
Specify the virtual machines whose virtual USB drives you want to retrieve.

Required? false
Position? 1
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false

-Template
Specify the virtual machine templates whose virtual USB drives you want to retrieve.

Required? false
Position? 2
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false

-Snapshot
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.

Required? false
Position? 3
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false

-Id
Specify the Id of the Usb devices you want to retrieve.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? true

-Name
Specify the names of the Usb devices you want to retrieve.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? true

-Server
Specify the vSphere servers on which you want to run the cmdlet. If no value is given to this parameter, the co
mmand runs on the default servers. For more information about default servers, see the description of Connect-V
IServer.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? true


This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".

INPUTS



OUTPUTS
UsbDevice[]


NOTES


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

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

C:\PS>Get-UsbDevice -VM (Get-VM -Location Host)


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






RELATED LINKS
Online version: http://www.vmware.com/support/developer/PowerCLI/PowerCLI501/html/Get-UsbDevice.html
Remove-UsbDevice