Remove-VirtualSwitch

This cmdlet removes the specified virtual switches from their locations.

Syntax

-VirtualSwitch  <VirtualSwitch[]>
[-Server  <VIServer[]>]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
VirtualSwitch
VirtualSwitch[] named
  • wildcards
  • pipeline
  • Specifies the virtual switches you want to remove.
    optional
    Server
    VIServer[] named
  • wildcards
  • Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is provided or $null value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer.

    Output

    Examples


    Example 1

    $vswitch = New-VirtualSwitch -VMHost 10.23.122.145 -Name VirtualSwitch
    Remove-VirtualSwitch -VirtualSwitch $vswitch

    Creates a new virtual switch named VirtualSwitch on the host with an IP address 10.23.122.145. Then removes the virtual switch.

    Related Commands

    Feedback

    Was this page helpful?