How can I turn on/off a policy depending on time of day
Hi team, I need to be able to activate and deactivate a policy depending of the time of day.
The requirements from work is to uninstall old applications from all users laptops/desktop and tablets during the night as the uninstall will reboot the users computers. What makes this hard is that it will run each night for a week and the user’s computer must be on the corporate network (e.g. I can't have it restarting the user’s computer if they have taken it home to do work for the night).
I thought the easiest would be checking schedule and if not found then install on the maintenance schedule but the issue is the users that take their computers home.
e.g. let say the policy checks between 8~11pm and the maintenance windows is 8~11pm. If the policy is turned on the local agent some time during the will schedule up the check for 8pm , as long as they are connected to a network of any kind at 8pm the applications will start to be removed -- bad.
I thought the easiest would be to turn the policy on and off e.g. policy gets turned on at 8pm and turned off at 11pm, this way the computers on the home network will not see the new policy and wont restart.
Any ideas how to achieve this, I'm expect a sql statement on the servers window scheduler but hoping for an easier option.