Managing vSphere standard switches
To manage complete vSphere networking, we need two different components. All the cmdlets for standard switches and other one come with the VMware.VimAutomation.Core
snap-in/module, and all the cmdlets related to distributed switches are included in the VMware.VimAutomation.Vds
module. In this section, we will discuss standard switches; in the next section, we will discuss distributed switches. For all the cmdlets to run successfully, we need to connect to a vCenter server. So, let's connect to a vCenter server and get started.
As you already know, whenever you install an ESXi server, by default a standard vSwitch with the name vSwitch0 is created.
The first thing that we need to do is to get accustomed to the vSwitch in an ESXi host using the PowerCLI cmdlets. For this, we can use the following cmdlets:
Get-VirtualSwitch
New-VirtualSwitch
Remove-VirtualSwitch
Set-VirtualSwitch
First, let's try to get a list of virtual switches available in the entire environment...