Run Scripts: Trigger Baseline Evaluation

This Script will trigger the Baseline (Based on the Baseline Name input) then report compliance and if non-compliant, what rule was non-compliant. In this example, I’m triggering the baseline “WaaS Pre-Assessment”.

The script does several things..

  • Triggers Machine Policy & Waits 2 Minutes
  • Gets the Baseline Information from WMI
  • If the Baseline is in WMI, it triggers and Evaluation & Waits 2 minutes
  • If Baseline = Complaint, Reports Complaint
  • If Baseline = Non-Compliant, triggers Machine Policy & Baseline Eval and waits 5 minutes
  • Checks again and reports Status

Script:

https://gist.github.com/gwblok/1ec2beafb00153737f32b480f5a73644

Posted on GARYTOWN.COM

5 thoughts on “Run Scripts: Trigger Baseline Evaluation”

  1. Before finding this, it would take days or weeks to test new Configuration items as we tweaked them to work properly. We’ll be making good use of it as we work on moving some GPO settings over to Configuration Items.

    I think Line 12 has a typo in the WMI class.

    Thanks for posting this. Great blog!

    Reply

Leave a Reply to skatterbrainz Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.