This is the built-in help made by Microsoft for the command 'Set-NetworkSwitchEthernetPortIPAddress', 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.
Sets the IP address on a port on a network switch.
Set-NetworkSwitchEthernetPortIPAddress [-InformationAction {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend}] [-InformationVariable [<System.String>]]
-CimSession <CimSession> -IpAddress <String> -PortNumber <Int32> -SubnetAddress <String> [<CommonParameters>]
Set-NetworkSwitchEthernetPortIPAddress [-InformationAction {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend}] [-InformationVariable [<System.String>]]
-CimSession <CimSession> -IpAddress <String> -SubnetAddress <String> [<CommonParameters>]
The Set-NetworkSwitchEthernetPortIPAddress cmdlet sets the IP address of an Ethernet port on a network switch.
<
Remove-NetworkSwitchEthernetPortIPAddress
Get-NetworkSwitchEthernetPort
<
Example 1: Assign an IP address to a port
PS C:\>$Session = New-CimSession -ComputerName "NetworkSwitch08"
PS C:\> Set-NetworkSwitchEthernetPortIPAddress -IpAddress "10.4.10.12" -PortNumber 21 -SubnetAddress "255.255.255.248" –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 assigns an IP address and subnet address to the specified port by using the $Session object.