Service Manual

Import-DscResource -Name MSFT_NetworkDevice_EthernetPortView
Node ("<switch-address>")
{
MSFT_NetworkDevice_EthernetPortView MyPort
{
PortId = "tengig-0-1"
EnabledState = "Enabled"
}
}
}
PortId identifies the interface. This example configures tengigabitethernet 0/1.
EnabledState identifies the status of the port. In this example, “Enabled” brings up the port.
7 In PowerShell, create the Ethernet MOF using configuration block.
MSFT_NetworkDevice_EthernetPortViewConfig -OutputPath c:\EthernetPortViewMof
This configuration creates the MOF in the C:\EthernetPortViewMof directory.
8 Connect to OMI.
$cred=Get-Credential -UserName:"admin" -Message:"Admin User?"
9 Enter the credential of the user admin.
To create a CIM-Session, use the following scripts:
$opt = New-CimSessionOption -UseSsl:$true -SkipCACheck:$true -SkipCNCheck:
$true -SkipRevocationCheck:$true
$box1 =New-CimSession -Credential:$cred -ComputerName:<switch—address> -
Port:5986 -Authentication:basic -SessionOption:$opt
<switch-address> is the IP address or hostname of the switch.
10 Apply the configuration using the following script:
PS C:\windows\system32> Start-DscConfiguration -CimSession:$box1 -Path:"C:
\EthernetPortViewMof" -Verbose –Wait
CimSession is the box1 created in step 9.
Path is the path of the MOF created in step 7.
11 Verify in the chassis for interface tengigabitethernet 0/1.
show running-config tengig 0/1
show interface tengig 0/1
Examples
This section shows various OMI configurations.
Ethernet Configuration
Configuration MSFT_NetworkDevice_EthernetPortViewConfig
{
Import-DscResource -Name MSFT_NetworkDevice_EthernetPortView
Node ("<switch-address>")
Open Management Infrastructure 71