OMCI from Command Line
OMCI from Command-line
There have been requests to provide a command-line tool for OMCI (OpenManage Client Instrumentation) so that System administrators who are not VBS (Visual Basic Script) or PowerShell script savvy can quickly check what OMCI provides and use it. For that purpose there is WMIC (Windows Management Instrumentation Command-line) which is integrated in Windows OSes as part of the WMI stack.
WMIC comes handy as it does not have to be installed separately. If you have a system running windows OS , you have WMIC too; ready to use from regular command prompt.
WMIC is an executable wmic.exe located in C:\Windows\System32\wbem.
Let’s attempt to be hands-on with OMCI using WMIC commands.
Please open a command prompt and start to execute the following commands -
Check if OMCI is installed
The namespace for access to Dell OMCI classes is “root\DCIM\sysman”.
wmic /namespace:\\root\dcim\sysman path __namespace
If OMCI is not installed , the abpove command will output -
ERROR:
Description = Invalid namespace
Check the DMTF profiles registered by OMCI
wmic /namespace:\\root\dcim\sysman Path DCIM_RegisteredProfile get RegisteredName
Check the Properties Available for a Class
wmic /namespace:\\root\dcim\sysman path dcim_BIOSEnumeration get /?
Check the BIOS attributes reported by OMCI
wmic /namespace:\\root\dcim\sysman path dcim_BIOSEnumeration get AttributeName
Get full instance info about a BIOS Attribute
wmic /namespace:\\root\dcim\sysman path dcim_BIOSEnumeration.AttributeName='Optimus' get /format:list
wmic /namespace:\\root\dcim\sysman path dcim_BIOSEnumeration.AttributeName='Secure Boot' get /format:list
wmic /namespace:\\root\dcim\sysman path dcim_BIOSEnumeration.AttributeName='Trusted Platform Module' get
Check if Passwords are installed
wmic /namespace:\\root\dcim\sysman path dcim_BIOSPassword get AttributeName,IsSet
Get First Power On Date and Manufacturing Date
wmic /namespace:\\root\dcim\sysman path dcim_chassis get FirstPowerOnDate, ManufactureDate /format:list
Get Model and Service Tag
wmic /namespace:\\root\dcim\sysman path dcim_chassis get Model,Tag /format:list
Get PropertyOwnership Tag
wmic /namespace:\\root\dcim\sysman path dcim_BIOSString Where "AttributeName like '%Property%'" get /format:list
Get Wake-on-LAN setting
wmic /namespace:\\root\dcim\sysman path dcim_BIOSEnumeration where "AttributeName like '%Wake-On%'" Get /format:list
Get the Boot order
wmic /namespace:\\root\dcim\sysman path dcim_BootSourceSetting get BIOSBootString /format:list
Clear the Command Log ssacmd.xml
wmic /namespace:\\root\dcim\sysman path dcim_recordlog WHERE "ElementName='CIM Provider Command Log'" call ClearLog
Notes –
1. To get the output in a file please use the switch /output:<file-name>
2. WMIC can be started in Interactive Mode by executing the command WMIC.