Unsolved

This post is more than 5 years old

1 Message

7745

November 29th, 2010 14:00

Need OMCI 8 Asset Tag Script Help

I'm trying to create a vb script to update asset tag info. The only ones I can find are for OMCI 7 and older. I took a stab at updating one of the posted scripts but can't seem to make it work. From what I can see there is a ChangeAssetTag method under DCIM_Chassis but I can figure out how to make it work. Here's a condensed version of what I've got so far...


Option Explicit

'*** Declare variables
Dim strNameSpace
Dim strComputerName
Dim strClassName
Dim objInstance
Dim strNewValue(2)
Dim strTimeoutPeriod(2)
Dim strAuthorizationToken
Dim returnValue
Dim objWMIService
Dim ColSystem
Dim oInParams


'*** Initialize variables
strNameSpace = "root/dcim/sysman"
strComputerName = "."
strClassName = "DCIM_Chassis"
strNewValue(0) = WScript.Arguments(0)
strTimeoutPeriod(0) = "60"
strAuthorizationToken = ""
returnValue = 0

'*** Retrieve the instance of DCIM_Chassis class
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate," &_
"AuthenticationLevel=pktprivacy}\\" & strComputerName & "\" &_
strNameSpace)
Set ColSystem=objWMIService.execquery ("Select * from " & strClassName)

For each objInstance in ColSystem
WScript.Echo "ChassisAssetTag: " & objInstance.ElementName
Set oInParams = objInstance.Methods_("ChangeAssetTag").InParameters.SpawnInstance_
oInParams.NewValue = strNewValue
oInParams.AuthorizationToken = strAuthorizationToken
'oInParams.TimeoutPeriod = strTimeoutPeriod
Set returnValue = objInstance.ExecMethod_("ChangeAssetTag", oInParams)
Next

1.1K Posts

November 30th, 2010 08:00

Check out the OMCI 8.0 reference guide. It has some sample scripts and definitions of all the classes.

http://support.dell.com/support/edocs/software/smcliins/cli80/EN/refgd/index.htm

December 1st, 2010 09:00

Doesn't other's get tired of someone responding that shouldn't. As the original poster indicated he did look at the doc in the link provide and is having trouble figuring out how to use a method mentioned but not used in the sample scripts. We too are struggling trying to figure out how to set the asset tag and if you have nothing useful to provide do not respond.

If anybody know a link or how to use the method in omci 8 to set the asset tag please post a sample.

Thanks!

1.1K Posts

December 2nd, 2010 12:00

I'm checking with the product team for details on the ChangeAssetTag method.

1.1K Posts

December 9th, 2010 18:00

I received some info from the product team and have added both Powershell and VBScript examples of the ChangeAssetTag method to the OMCI Sample Script page. Let me know if this doesn't clarify the ChangeAssetTag method.

http://www.delltechcenter.com/page/OMCI+Sample+Scripts

9 Posts

December 25th, 2010 23:00

The newly added VBScripts ChangeAssetTag and ChangePropertyOwnershipTag to set these fields are great. Thank you. I can read the AssetTag and ServiceTag as follows:
AssetTag = objInstance.Properties_.Item("ElementName").Value.
ServiceTag = objInstance.Properties_.Item("Tag").Value.
But I cannot read back the OwnerTag field. I have tried OwnershipTag, Owner, OwnerTag etc without luck.There is obviously some inconsistency in field names for reading and writing. Why is reading back the OwnerTag important? Because in our large, geographically widely dispersed fleet the OwnerTag field can be used to store many variables.

9 Posts

December 26th, 2010 12:00

Correction: I have just worked out to read:
OwnershipTag = objInstance.Properties_.Item("PropertyOwnershipTag").Value. Sorry.

0 events found

No Events found!

Top