PowerShell Logo Small

Disable-NetworkSwitchEthernetPort



This is the built-in help made by Microsoft for the command 'Disable-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.

SYNOPSIS

Disables an Ethernet port on a network switch.

SYNTAX


Disable-NetworkSwitchEthernetPort [-InformationAction {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend}] [-InformationVariable [<System.String>]] -CimSession
<CimSession> -DeviceID <String> [<CommonParameters>]
Disable-NetworkSwitchEthernetPort [-InformationAction {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend}] [-InformationVariable [<System.String>]] -CimSession
<CimSession> -PortNumber <Int32> [<CommonParameters>]
Disable-NetworkSwitchEthernetPort [-InformationAction {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend}] [-InformationVariable [<System.String>]] -CimSession
<CimSession> [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Disable-NetworkSwitchEthernetPort cmdlet disables an Ethernet port on a network switch.



<

RELATED LINKS

Enable-NetworkSwitchEthernetPort
Get-NetworkSwitchEthernetPort

REMARKS

<

Examples


Example 1: Disable a port

PS C:\>$Session = New-CimSession -ComputerName "NetworkSwitch08"
PS C:\> Disable-NetworkSwitchEthernetPort -CimSession $Session -PortNumber 21



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.

This command disables port 21 for NetworkSwitch08 by using the $Session object.






Example 2: Disable a port by using a device ID

PS C:\>Disable-NetworkSwitchEthernetPort -CimSession $Session -DeviceId "Ethernet17"



This command disables an Ethernet port with device ID Ethernet17 on a network switch. The command uses a CimSession, similar to the first example.