Dell OMCI 8.x–Changing the Asset Tag with PowerShell

Last fall Dell released a major revision to their Open Manage Client Instrumentation (OMCI) management extension for their enterprise systems.  With this update they chose to align their WMI Namespace and Classes with industry standards and the writable WMI Classes and their associated instances, methods and properties were moved to the following WMI Namespace: ROOT\DCIM\SYSMAN

This switch brought on some challenges for system administrators attempting to script various BIOS changes.  Today, I am going to show you how to change the Asset Tag using OMCI 8.x.

(gwmi DCIM_Chassis -namespace root\dcim\sysman).ChangeAssetTag(“newAstg”)

While already documented on Dell Tech Center, there is a bit of a “gotcha” when working with laptops while on a docking station now.  For those of you too lazy to visit the link, here is the PowerShell command to change the Asset Tag in BIOS:

The problem you will see with laptops here, is that OMCI 8 now recognizes the docking station as an additional chassis type registered in the DCIM_Chassis WMI Class. So, when running the above listed command, PowerShell “may” look at the Docking Station WMI Instance and produce an error message stating that the “ChangeAssetTag” method cannot be found.

Luckily this is easily corrected with a simple modification to the PowerShell command as follows:

(gwmi DCIM_Chassis -namespace root\dcim\sysman | Where-Object {$_.CreationClassName -ne "DCIM_DockingStation"}).ChangeAssetTag("newAstg")

As you can see, we are narrowing our search to exclude anything with the CreationClass of “DCIM_DockingStation” which will skip over the Docking Station WMI Instance and only target the main computer instance.

I hope this helps others out there.  It took me a while to track that one down.