This is the built-in help made by Microsoft for the command 'Enable-NetworkSwitchEthernetPort', 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.
Enables an Ethernet port on a network switch.
Enable-NetworkSwitchEthernetPort [-InformationAction {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend}] [-InformationVariable [<System.String>]] -CimSession
<CimSession> -DeviceID <String> [<CommonParameters>]
Enable-NetworkSwitchEthernetPort [-InformationAction {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend}] [-InformationVariable [<System.String>]] -CimSession
<CimSession> -PortNumber <Int32> [<CommonParameters>]
Enable-NetworkSwitchEthernetPort [-InformationAction {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend}] [-InformationVariable [<System.String>]] -CimSession
<CimSession> [<CommonParameters>]
The Enable-NetworkSwitchEthernetPort cmdlet enables an Ethernet port on a network switch.
<
Disable-NetworkSwitchEthernetPort
Get-NetworkSwitchEthernetPort
<
Example 1: Enable a ports by using a device IDthe pipelinesa device ID
PS C:\>$Session = New-CimSession -ComputerName "NetworkSwitch08"
PS C:\> Enable-NetworkSwitchEthernetPort -DeviceID "Ethernet17" -CimSession $Session
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 command enables ports for the device that has the ID Ethernet17 by using the $Session object.
Example 2: Enable a port by using a port number
PS C:\>Enable-NetworkSwitchEthernetPort -Port 21 -CimSession $Session
This command enables port 21. The command includes a CimSession, similar to the first example.