I have a WMI script which displays the asset tag for HP desktops/laptops/servers. "Asset Tag" is a configurable field in BIOS.
I dont know WMI / scripting too well, so my question is whether or not I can set or edit the asset tag using WMI? Anyone have a good idea on how I can attempt to do this?
On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_SystemEnclosure")
For Each objItem in colItems
Wscript.Echo "Asset Tag: " & objItem.SMBIOSAssetTag