Topics: Support Requests
Sep 5, 2015 at 11:32 AM
Edited Sep 5, 2015 at 11:33 AM
I noticed when creating service window on the client code similar to the following is executed...
Set-WmiInstance -Class CCM_ServiceWindow -Namespace 'ROOT\\ccm\\Policy\\Machine\\RequestedConfig' -PutType 'CreateOnly' -argument @{____PolicySource = 'LOCAL'____; PolicyRuleID = 'NONE'; PolicyVersion = '1.0'; Schedules = '", Schedules, "'; ServiceWindowType = ", ServiceWindowType.ToString(), "; ServiceWindowID = '", str1, "'; PolicyID = '", str1, "'; PolicyInstanceID = '", str1, "'};$a.ServiceWindowID" };
            string str2 = string.Concat(schedules);
I am still doing some testing and research in the SDK but don't local policies (PolicySource = 'LOCAL') "tattoo" the client - that is unless reverted they are their forever?

I seem to recall there was something similar (a setting that produced a local policy) in client center 2007 that was eventually removed in a later release,
Sep 7, 2015 at 7:36 AM
yes, local policies will "tattoo" the client and stay on the machine until someone runs a cleanup:
get-wmiobject -query "SELECT * FROM CCM_ServiceWindow WHERE PolicySource='LOCAL' AND ServiceWindowType <> 6" -namespace "ROOT\ccm\Policy\Machine\RequestedConfig" | Remove-WmiObject
Note: Business hours are also local policies, that's why the PSScript above does not affect ServiceWindowType 6 (Business Hours)...

In Client Center, there is a Button "Del all local SW" which does exactly the same and cleans all local ServiceWindows...