vSphere PowerCLI Reference

Remove-UsbDevice

Synopsis

This cmdlet removes the specified USB devices from a virtual machine.

Syntax

Remove-UsbDevice [-UsbDevice] <UsbDevice[]> [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-UsbDevice

Detailed Description

This cmdlet removes the specified USB devices from a virtual machine.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
UsbDeviceUsbDevice[]Specifies the USB devices you want to remove.truetrue (ByValue)
ConfirmSwitchParameterIf the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation.falsefalse$true
WhatIfSwitchParameterIndicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified.falsefalse

Return Type

None

Notes

Examples

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

Get-UsbDevice -VM (Get-VM -Location $vmhost) | Remove-UsbDevice

Retrieves the virtual machines on the host stored in the $vmhost variable and removes their USB devices.


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