Service Manual
Following example uses the name MSFT_NetworkDevice_EthernetPortViewConfig.
Configuration MSFT_NetworkDevice_EthernetPortViewConfig
{
Import-DscResource -Name MSFT_NetworkDevice_EthernetPortView
Node ("<ip-address or name of the node>")
{
MSFT_NetworkDevice_EthernetPortView MyPort
{
PortId = "tengig-0-1"
EnabledState = "Enabled"
}
}
}
• PortId identies the interface. This example congures tengigabitethernet 0/1.
• EnabledState identies the status of the port. In this example, “Enabled” brings up the port.
7 In PowerShell, create the Ethernet MOF using conguration block.
MSFT_NetworkDevice_EthernetPortViewConfig -OutputPath c:\EthernetPortViewMof
This conguration 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:chassis-1 -Port:5986 -
Authentication:basic -SessionOption:$opt
chassis-1 is the IP address of the chassis.
10 Apply the conguration 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 congurations.
Ethernet Conguration
Configuration MSFT_NetworkDevice_EthernetPortViewConfig
{
Import-DscResource -Name MSFT_NetworkDevice_EthernetPortView
Node ("172.168.1.2")
{
MSFT_NetworkDevice_EthernetPortView MyPort
{
PortId = "tengig-0-11"
Description = "Interface connecting to S4810"
56
Open Management Infrastructure