Revelance and WMI

(imported topic written by admccray91)

We are in process of enabling power management in bigfix. The though process is that we have several student labs that are using Microsoft’s Steadystate Product. We want to point all of these machines to BigFix for patch management, but need assistance on the configuration part.

The basic premise is to turn the computers on at a designated time, run all the patches as part of a baseline, and in the end, retain all of the changes into the Hard Disk Protection. In looking over the internet, there are some VBScripts that make use of WMI to enable the “retain changes” feature. I have tested the following VBScript against STeady State and it works.

----------

color=blue

’ ***

’ *** Version: 1.0

’ *** Author: Daniel Reis

’ *** Email: daniel@fe.up.pt

’ ***

’ *** Date: 12/06/2008

’ ***

dim objNet

On Error Resume Next

’ Identify the computer to manage

Const strComputer= “.”

Const WDP_MODE_COMMIT = 2

Const SUCCESS = 0

Const FAILURE = 1

set objWbemServices = GetObject (“winmgmts:\” & strComputer & “\root\wmi”)

set setWdpObjects = objWbemServices.ExecQuery (“SELECT * FROM WDP_Control”)

For Each objWdp In setWdpObjects

objWdp.CurrentMode = WDP_MODE_COMMIT

objWdp.Put_

Next

If Err.Number 0 Then

Wscript.echo “FAILURE”

Return FAILURE

Else

Wscript.echo “SUCCESS”

Return SUCCESS

End If

---------

[/color]

How can I create a relevance expression to see if the the Disk protection is enabled or not using WMI.

Thanks,

Adrian McCray

(imported comment written by MattBoyd)

I don’t believe I have the WDP_Control object on my machine, but try this in the relevance debugger on a machine that has it enabled:

string values of selects "* From WPD_Control" of wmi "root\wmi"
1 Like

(imported comment written by SystemAdmin)

Can you have the BES client make enable or disable a wmi? if so can you provide an example?.

If this is possible, by having the BES Client change the WDP WMI mode from wdp_mod_discard (0) to wdp_mode_commit (2), the need to run a vb script would not be warranted.

Any ideas?

(imported comment written by BenKus)

Hey guys,

BigFix has no native capability to enable/disable wmi… The recommended (and hopefully very simple) way to do it is to embed the vbscript in an action and make the agent run the action…

Jesse posts here a simple example on how to embed a script in an action:

http://forum.bigfix.com/viewtopic.php?pid=7798#p7798

Ben