Intel® Business Client Software Development
Support for Intel® vPro™ software development and the technologies associated with Intel vPro platforms.

Object required in VB script

Christoph_J_Intel
119 Views
Hi all,
I try to write a VB script that disables the alarm clock on a AMT 5.1 system. I pasted it below. But when I call Put, I get an Object required error message. I checked the msdn documentation for Session.put, and the example they give work, but mine doesn't, although it is very similar. Does anybody know what's wrong with it?

Christoph


Dim WSMan
Dim Session, Options, iFlags
Set WSMan = CreateObject( "WSMAN.Automation" )

iFlags = WSMan.SessionFlagUseDigest Or _
WSMan.SessionFlagCredUsernamePassword Or _
WSMan.SessionFlagUTF8

Set Options = WSMan.CreateConnectionOptions
Options.Username = "admin"
Options.Password = "P@ssw0rd"

Set Session = WSMan.CreateSession("http://192.168.1.100:16992/wsman", _
iFlags, Options)

strResource = "http://intel.com/wbem/wscim/1/amt-schema/1/AMT_AlarmClockService"

Set objResultSet = Session.Put( strResource, "AMT_AlarmClockServiceIntel AMT Alarm Cloc
k Service
Intel AMT Alarm Clock ServiceCIM_ComputerSystemManagedSystem
" )


While Not objResultSet.AtEndOfStream
Wscript.Echo objResultSet.ReadItem
Wend
0 Kudos
3 Replies
Gael_H_Intel
Moderator
119 Views
Hi all,
I try to write a VB script that disables the alarm clock on a AMT 5.1 system. I pasted it below. But when I call Put, I get an Object required error message. I checked the msdn documentation for Session.put, and the example they give work, but mine doesn't, although it is very similar. Does anybody know what's wrong with it?

Christoph


Dim WSMan
Dim Session, Options, iFlags
Set WSMan = CreateObject( "WSMAN.Automation" )

iFlags = WSMan.SessionFlagUseDigest Or _
WSMan.SessionFlagCredUsernamePassword Or _
WSMan.SessionFlagUTF8

Set Options = WSMan.CreateConnectionOptions
Options.Username = "admin"
Options.Password = "P@ssw0rd"

Set Session = WSMan.CreateSession("http://192.168.1.100:16992/wsman", _
iFlags, Options)

strResource = "http://intel.com/wbem/wscim/1/amt-schema/1/AMT_AlarmClockService"

Set objResultSet = Session.Put( strResource, "AMT_AlarmClockServiceIntel AMT Alarm Cloc
k Service
Intel AMT Alarm Clock ServiceCIM_ComputerSystemManagedSystem
" )


While Not objResultSet.AtEndOfStream
Wscript.Echo objResultSet.ReadItem
Wend

Hi Christoph! I have asked Lance to take a look at this one since he is our Alarm Clock expert!
Andrew_S_Intel2
Employee
119 Views

Hi Christoph! I have asked Lance to take a look at this one since he is our Alarm Clock expert!

Christoph, can you put a check in to see whether the Session object is getting created successfully? The arguments in your Session.put look okay to me, but I'm wondering if there was an issue with the Session object itself getting created.
Lance_A_Intel
Employee
119 Views
It seems like it may be a WS-Man issue and I've asked Randy to take a look.

From an Alarm Clock perspective, to clear/disable the alarm you should just need to call PUT with null arguments. The only thing I can think of to try is adding the arguments for the start time and interval, but not put any values with them.
Reply