Service Manual
}
}
}
MSFT_NetworkDevice_EthernetPortViewConfig -OutputPath c:\EthernetPortViewMof
The MOF for the node 172.168.1.2 gets stored in the path C:\EthernetPortViewMof.
NOTE: Save the PowerShell commands in a le with an extension .ps1 (PowerShell Script) and execute.
Push the conguration.
PS C:\> Start-DscConfiguration -CimSession $dellBox -Path C:\EthernetPortViewMof -Wait -Force
Enumerating an Instance using a winrm Session
PS C:\Users\Administrator> winrm e http://schemas.microsoft.com/wbem/wscim/1/
MSFT_NetworkDevice_ConfigurationView?__cimn
amespace=root/Microsoft/DesiredStateConfiguration -r:http://10.10.60.1:5985 -auth:basic -
u:omiserver -p:xxxxx -encoding:ut
f-8 -SkipCNCheck -SkipCACheck
MSFT_NetworkDevice_ConfigurationView
DeviceId = 90:b1:1c:f4:9d:23
HostName = S6000-1
Description = null
Banner = null
EnableBanner = null
<snip...>
Enumerating an Instance using a CIM Session
Create a CIM session
PS C:\Users\Administrator> $cred=Get-Credential -UserName:"omiuser" -Message:"OMI User?"
PS C:\Users\Administrator> $opt = New-CimSessionOption -UseSsl:$true -SkipCACheck:$true -
SkipCNCheck:$true -SkipRevocationCheck:$true
PS C:\Users\Administrator> $s6k=New-CimSession -Credential:$cred -ComputerName:10.10.60.1 -Port:
5986 -Authentication:basic -SessionOption:$opt
Get the CIM instance of various Resource View classes
PS C:\Users\Administrator> Get-CimInstance -ClassName MSFT_NetworkDevice_ConfigurationView -
Namespace root/Microsoft/
DesiredStateConfiguration -CimSession:$s6k
DeviceId : 90:b1:1c:f4:9d:23
HostName : S6000-1
Description :
Banner :
EnableBanner :
PSComputerName : 10.10.60.1
<snip...>
Classes and Schema Implementation
This section lists the implementation of classes and schema in OMI.
1 Prole Implementation
• CIM_RegisteredProfile
• CIM_ElementConformsToProfile
Open Management Infrastructure
57