Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

TriggerSchedule method does not get trigger

11 views
Skip to first unread message

newtoWMI

unread,
Apr 5, 2010, 11:17:01 AM4/5/10
to
I am using the following code to trigger a machine policy check remotely.
However The TriggerSchedule method does not get trigger. The code works it
compiles and runs fine. I am also able to connect the the remote machine but
nothing gets triggered. Here is the code...Any help will be appreciated:)

Dim strConnectionString As String = "\\" & strOldComputerName & "\root\ccm"

Dim scope As ManagementScope

scope = New ManagementScope(strConnectionString)

scope.Connect()

Dim mgmtClass As ManagementClass = New ManagementClass(scope.Path.Path,
"SMS_Client", Nothing)

Dim inParams As ManagementBaseObject =
mgmtClass.GetMethodParameters("TriggerSchedule")

inParams("sScheduleID") = "{00000000-0000-0000-0000-000000000021}"

Dim outParams As ManagementBaseObject =
mgmtClass.InvokeMethod("TriggerSchedule", inParams, Nothing)

0 new messages