In this example we are killing the Silverlight start menu folder enabling us to use the Windows Updates while keeping the start menu clean.
Create the Configuration Item
1. In the console click Create Configuration Item
2. Name your configuration item, click ‘This configuration item contains application settings’ and click Next
3. Select ‘Always assume application is installed’ and click Next
4. Click New, Change the Setting type to ‘Script’. Change the Data type to ‘String’. Also name your Setting.
5. Under Discovery Script click ‘Add Script’
6. Ensure Script language is ‘Windows Powershell’ and paste the following
$false -eq (Test-Path “C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Silverlight”)
7. Under Remediation Script click ‘Add Script’
8. Ensure Script language is ‘Windows Powershell’ and paste the following
remove-item “C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Silverlight” -recurse
9. Click ‘Ok’, then click the ‘Compliance Rules’ tab
10. Click ‘New’
11. Configure the Compliance rule: Set ‘Rule type’ to Value. Set the Value returned to equal 0. Click ‘Run the specified remediation script when this setting is non complaint’.
12. Click ‘OK’ then ‘Next’, ‘Next’ on the Wizard Screen.
13. Choose the OS Environments for compliance
14. Click ‘Next’ until you finish the Wizard.
15. Under Configuration Baselines click ‘Create Configuration Baseline’ and add the configuration item we just created, then click ‘OK’
16. The Baseline is now ready to be deployed to your test collection!
Right click and select Deploy, Enable the remediation options and change the Schedule if needed.
17. On your test machine, request a new machine policy, then click on the Components tab. Clicking Refresh should show the new baseline which you can then evaluate.
18. Within a minute the remediation runs and the folder disappears!