Removing vSphere Distributed Switches
To remove a vSphere Distributed Switch, you can use the
Remove-VDSwitch
cmdlet. This cmdlet has the following syntax:
Remove-VDSwitch [-VDSwitch] <VDSwitch[]> [-RunAsync] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
In the next example, we will remove the vSphere Distributed Switch VDSwitch1
:
PowerCLI C:\> Get-VDSwitch -Name VDSwitch1 | >> Remove-VDSwitch -Confirm:$false >>
Get Learning PowerCLI now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.