Add-VMSwitch
Adds a virtual switch to an Ethernet resource pool.
PowerShell
Add-VMSwitch
[-Name] <String[]>
[-ResourcePoolName] <String[]>
[-ComputerName <String[]>]
PowerShell
Add-VMSwitch
[-VMSwitch] <VMSwitch[]>
[-ResourcePoolName] <String[]>
The Add-VMSwitch cmdlet adds a virtual switch to an Ethernet resource pool.
PowerShell
PS C:\>Add-VMSwitch -Name Test -ResourcePoolName "Engineering Department"
Adds virtual switch Test to Ethernet resource pool Engineering Department.
PowerShell
PS C:\>Get-VMSwitch -Name Test | Add-VMSwitch -ResourcePoolName "Engineering Department"
Adds virtual switch Test to Ethernet resource pool Engineering Department.
Type: | String[] |
Position: | Named |
Default value: | . |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the name of the virtual switch to be added.
Type: | String[] |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | True |
Specifies the name of the resource pool to which the virtual switch is to be added.
Type: | String[] |
Position: | 2 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | True |
Specifies the virtual switch to be added to the Ethernet resource pool.
Type: | VMSwitch[] |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
None by default; Microsoft.Virtualization.Powershell.VMNetwork if -PassThru is present.