Get-VBRViVirtualSwitch

Short Description

Returns VMware virtual switches.

Applies to

Platform: VMware

Product Edition: Standard, Enterprise, Enterprise Plus, Veeam Universal License

Syntax

Get-VBRViVirtualSwitch -Server <Object[]>  [<CommonParameters>]

Detailed Description

This cmdlet returns VMware virtual switches that are created on a ESXi host or cluster.

Parameters

Parameter

Description

Type

Required

Position

Accept
Pipeline
Input

Server

Specifies the ESXi or ESXi host or cluster. The cmdlet will return the virtual switches created on this host or cluster.

Accepts the Object[] object. Run the Get-VBRServer cmdlet to get this object.

True

Named

True (ByValue,
ByProperty
Name)

<CommonParameters>

This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see Microsoft Docs.

Output Object

VBRViVirtualSwitch

Examples

Get-VBRViVirtualSwitchExample 1. Getting Switches Created on Selected Host

This example shows how to get switches created on the host named ESXiHost.

$server = Get-VBRServer –Type ESXi -Name "ESXiHost"

Get-VBRViVirtualSwitch -Server $server

Perform the following steps:

  1. Run the Get-VBRServer cmdlet. Specify the Type and the Name parameter values. Save it to the $server variable.
  2. Run the Get-VBRViVirtualSwitch cmdlet. Set the $server variable as the Server parameter value.

Get-VBRViVirtualSwitchExample 2. Getting Switches Created on Selected Host

This example shows how to get switches created on the VMware cluster named vSAN.

$cluster = Find-VBRViEntity -Server ESXiHost -HostsAndClusters -Name vSAN

Get-VBRViVirtualSwitch -Server $cluster

Perform the following steps:

  1. Run the Find-VBRViEntity cmdlet. Specify the Server parameter value. Provide the HostsAndClusters parameter. Specify the Name parameter value. Save it to the $cluster variable.
  2. Run the Get-VBRViVirtualSwitch cmdlet. Set the $cluster variable as the Server parameter value.

Related Commands