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
Posted on GARYTOWN.COM
5 thoughts on “Run Scripts: Trigger Baseline Evaluation”
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!
Yep. Line 12 has a typo. But overall this is awesome work!
Very helpful! Thanks!
I don't see the script anywhere on this page.
It's probably your security. When I was at my last employeer, I too noticed a lot of blogs missing their code, their security tools stripped it out.
I had the script pulling a script from GitHub (gist), which I've noticed being blocked too. Here is the link to the script.
I'll be eventually updating the post and moving the script into my normal github: https://github.com/gwblok/garytown/tree/master/RunScripts