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