I have been working on a script to move our SCCM clients over to our new SCCM server this involves setting the site ID which is pretty easy then through WMI call a Policy update is triggered. I originally tried this through Powershell which didn't work out for various reason. I have since come back to my roots and began coding this script in Perl I have most of the calls working but can't figure out how to convert the Powershell WMI call over to a Perl Win32::OLE WMI call. Below is the Powershell WMI call to the WMI repo. I am hoping someone can help me figure out how I would do this in Perl to trigger the SCCM policy update. Many thanks in advance as this has been 3 long days trying to get it to work.

Powershell code:
$SMSCli = [wmiclass] "\\$computer\root\ccm:sms_client" $SMSCli.TriggerSchedule("{00000000-0000-0000-0000-000000000003}")

I have queried the WMI repository before and I have even created a process through it but I don't understand in Perl how to set this value to cause an machine policy update. I would appreciate any help as I would like to use Perl to flip all 2000 devices with out the program choking on bad SCCM clients like Powershell does.


In reply to WMI SCCM TriggerSchedule by dayhkr

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.