PowerCLI Reference

Remove-UsbDevice

Synopsis

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

Syntax

Remove-UsbDevice [-UsbDevice] <UsbDevice[]> [-Confirm] [-WhatIf] [<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
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 © VMware, Inc. All rights reserved.