Book Image

Learning PowerCLI for VMware VSphere

By : Robert van den Nieuwendijk
Book Image

Learning PowerCLI for VMware VSphere

By: Robert van den Nieuwendijk

Overview of this book

Table of Contents (17 chapters)
Learning PowerCLI
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

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