PowerShell Logo Small

New-NetworkSwitchVlan



This is the built-in help made by Microsoft for the command 'New-NetworkSwitchVlan', in PowerShell version 5 - as retrieved from Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Creates a VLAN for a network switch.

SYNTAX


New-NetworkSwitchVlan [-CimSession] <CimSession> [[-Caption] [<String>]] [[-Description] [<String>]] [-VlanID] <Int32> [-Name] <String> [-InformationAction {SilentlyContinue
| Stop | Continue | Inquire | Ignore | Suspend}] [-InformationVariable [<System.String>]] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The New-NetworkSwitchVlan cmdlet creates a virtual local area network (VLAN) for a network switch.



<

RELATED LINKS

Disable-NetworkSwitchVlan
Enable-NetworkSwitchVlan
Get-NetworkSwitchVlan
Remove-NetworkSwitchVlan
Set-NetworkSwitchVlanProperty

REMARKS

<

Examples


Example 1: Create a VLAN

PS C:\>$Session = New-CimSession -ComputerName "NetworkSwitch08"
PS C:\> New-NetworkSwitchVlan -Name "Contoso07VLAN" -Caption "VLAN 07" -CimSession $Session
Caption Description ElementName InstanceID VlanID PSComputerName
------- ----------- ----------- ---------- ------ --------------
VLAN 07 VLAN0004 Contoso:NetworkVL... 4 10.19.26.4



The first command creates a CimSession for a network switch, and then stores it in the $Session variable. For more information about CimSession objects, type Get-Help
New-CimSession.

The second creates a VLAN for the switch NetworkSwitch08 by using the $Session object.