locked
BUG: Group Policy Preferences - Scheduled Tasks RRS feed

  • Question

  • Hi,

    Given this is reproducable in our environment, I'm going to go out on a limb and say the following is a bug. I'll include the steps below, but in a nutshell, we are finding policy objects populated with more than one Vista or later scheduled task is corrupting the policy file through the addition of duplicate entries.

    I'll keep the following detail section short, because, well, it's just past 6pm on Friday, and I just want to get out of here.

    Steps:

    1. Open GPMC on either a Windows 7 machine or R2 domain controller (tried both just to rule the other out),
    2. Create a new policy,
    3. Disable the user settings,
    4. Edit the policy object,
    5. Expand Computer Configuration > Preferences > Control Panel Settings > Scheduled Tasks
    6. Select New > Scheduled Tasks (Windows Vista or later),
    7. General tab: Fill in the Name, Action = Replace, account name, password, "run whether user is logged on or not"  option selected, "run with the highest priviliges",
    8. Triggers tab: Enter any "One time" time schedule that takes your fancy,
    9. Actions tab: Enter any action you feel is appropriate - it makes no difference,
    10. Conditions tab: Check the Wake the computer to run this task option,
    11. Settings tab: Just skip it,
    12. Common tab: Check the "Remove this item when no longer used" option, check the "Item-level targetting" option,
    13. Common tab: Select the Targetting button, New Item:Computer, Computer Name = whatever you have handy to test on, Netbios radio button selected,
    14. Ok button, and Ok button again to get back out to the main editing window,
    15. Repeat steps 6 through to 14 to add a second scheduled task,
    16. Close the policy editor so that you're not back out at the main GPMC screen.

    You should end up with something resembling the following: http://public.bay.livefilestore.com/y1pOnr0-qf0ihv2gX4xiFowTC4hbxQY0y1LakHuPVRDd_DQ6WSKg7vuk_kOTJt_RliD7Kjc31p2oUJMh5B3H4G4Dw/gpmc_EditorScheduledTasks.PNG

    Okay, so, what I'm seeing from this point on is as follows:
    1. If you immediately inspect the Settings of this policy, instead of seeing correct ordering, you will see a duplicate of the first entry,
    (http://public.bay.livefilestore.com/y1pRnNyvWKAZUeGihhBhJzaWlscin-L4gcQnCXHA-vEp5amlR1wgbJevvYpl7Mkomj1uVLAYqMO87RhOWkHuDIq-A/gpmc_SettingsDuplicates.png)
    2. If you check the target computer, the correct number of entries appear in Task Scheduler,
    (http://7mgp6a.bay.livefilestore.com/y1peSCvQExf6JhdDVW-pcq89zMYrrpVPhY-9r37vUD-94i42zV4w9p-O9KkMyPS8oQbTGM3jlvZYhRT9c_nMiRLO9h5xrVwTIey/gpmc_ClientTaskScheduler.PNG)
    3. If you use GPMC to generate a resultant set of policy (under the Group Policy Results node) for that computer minus the user settings, you will get the following error:

    An error occurred while generating report:
    Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index
    (http://7mgp6a.bay.livefilestore.com/y1pvjanolUi28OGoOTbY_58hpyi3_8k6Nvpu8CzBod0-3P3ATaGpwEU_ISuxE9l91YwAiUvxVGDr4McQlkydYu7YbdGFySJYjeb/gpmc_GPMCError.PNG)

    Is this significant? I don't know, but I do know it sure as nuts shouldn't be happening. The nett result is you can't audit that machine if required, and that's just not very useful.

    Cheers,
    Lain

    Friday, January 29, 2010 10:46 AM

Answers

  • Hi Lain,

    Thank you for your reporting. I can reproduce it too. I will report this issue product team.

    Regards.


    This posting is provided "AS IS" with no warranties, and confers no rights.
    • Marked as answer by Lain Robertson Tuesday, February 2, 2010 3:14 AM
    Monday, February 1, 2010 11:19 AM

All replies

  • Hi Lain,

    Thank you for your reporting. I can reproduce it too. I will report this issue product team.

    Regards.


    This posting is provided "AS IS" with no warranties, and confers no rights.
    • Marked as answer by Lain Robertson Tuesday, February 2, 2010 3:14 AM
    Monday, February 1, 2010 11:19 AM
  • Thanks Mervyn.

    Cheers,
    Lain
    Tuesday, February 2, 2010 3:14 AM
  • Get this get resolved?  We are receiving the same error when running GPResult on a Windows 2008 R2 server.

    Friday, July 9, 2010 3:03 PM
  • Did this ever get fixed? I know the GPP Task Scheduler works on 2003 and 2008 R2 just not 2008. Did Microsoft ever make a hot fix for this?
    Friday, December 10, 2010 4:48 PM
  • same problem over here..

    worse, I can't seem to get reporting on the client working again. Deleted the sheduled task preference but no go.

    edit: gpupdate /force fixed it. Now I guess I'd better distribute the scheduled task in another way...


    • Proposed as answer by Tesfaye_SI Thursday, April 7, 2011 3:25 PM
    • Unproposed as answer by Tesfaye_SI Thursday, April 7, 2011 3:25 PM
    Wednesday, January 12, 2011 5:09 PM
  • Exactly the same scenario & We are receiving the same error when running GPResult on a Windows 2008 R2 server....Anybody has any answer on this ?

    Tuesday, April 5, 2011 9:59 AM
  • I hope this gets resolved.  I encountered the behavior this morning while creating task scheduler preferences.  This applied to the Computer configuration as well as the User configuration. 

    I'd also like to add that tasks created using the Immediate Task creation option do not get applied at all.  This one isn't a big deal because I can create a regular Windows Vista task and then set a trigger that runs upon task creation.  I think the option should still work. 

    Thursday, April 7, 2011 3:35 PM
  • I was really hoping this would get fixed in Win7 SP1. We've got a scheduled task set to shut machines down at midnight if they've been idle for an hour, that trips this bug because we use a script.

    Given SP1 has come and gone without a resolution to this (now 18 month old) bug I'm going to have to look at non-scripted ways of doing the same thing.

    Monday, September 19, 2011 6:28 AM
  • Got this problem too.
    Wednesday, November 23, 2011 9:56 AM
  • Has anyone managed to solve this? or work around it?

    if i enable verbose logging for GPMC i'm able to see some settings but it's not complete as seeing the report,

    also it happens if i perform "gpresult /h gp.htm" from the machine itself

    from the log GpmgmtManaged.log

    Reporting(7660.1)14:07:12 Rsop::ConvertToHtml:******The following exception occured:
    *******Message    : Index was out of range. Must be non-negative and less than the size of the collection.
    Parameter name: index
    *******StackTrace :
    System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
    Parameter name: index
       at System.ThrowHelper.ThrowArgumentOutOfRangeException()
       at System.Collections.Generic.List`1.get_Item(Int32 index)
       at System.Collections.ObjectModel.Collection`1.get_Item(Int32 index)
       at Microsoft.GroupPolicy.Reporting.Html.Settings.ControlPanel.ScheduledTasks.ScheduleV2GeneralSection.AppendToBody(SettingsContext context, StringBuilder body, IPolicyMakerSetting setting)
       at Microsoft.GroupPolicy.Reporting.Html.Settings.PolicyMakerPropertiesTemplate.SetProperties(IPolicyMakerSetting setting)
       at Microsoft.GroupPolicy.Reporting.Html.Settings.PolicyMakerSettingTemplate.SetRsopSetting(IPolicyMakerRsopSetting rsopSetting)
       at Microsoft.GroupPolicy.Reporting.Html.Settings.PolicyMakerGroupTemplate.SetRsopGroup(List`1 rsopSettingsList)
       at Microsoft.GroupPolicy.Reporting.Html.Settings.PolicyMakerSettingsTemplate.SetRsopSettingsGroup(PolicyMakerSettingsGroup rsopSettingsGroup)
       at Microsoft.GroupPolicy.Reporting.Html.Settings.ControlPanel.ScheduledTasks.ScheduledTasksTemplate.SetRsopSettings(PolicyMakerSettings settings)
       at Microsoft.GroupPolicy.Reporting.Html.Settings.PolicyMakerSettingsTemplate.SetExtensionData(GPOExtensionData extensionData)
       at Microsoft.GroupPolicy.Reporting.Html.Settings.ControlPanel.ControlPanelSectionTemplate.CreateSubsectionTemplates(ArrayList subsections, Hashtable nameExtensionMap)
       at Microsoft.GroupPolicy.Reporting.Html.Settings.ControlPanel.ControlPanelSectionTemplate.SetControlPanelSettings(IEnumerable extensions)
       at Microsoft.GroupPolicy.Reporting.Html.Settings.MainSettingsSectionTemplate.SetConfiguration(IEnumerable extensionDataList)
       at Microsoft.GroupPolicy.Reporting.Html.Settings.ConfigurationSectionTemplate.AddContent(IEnumerable extensionDataList)
       at Microsoft.GroupPolicy.Reporting.Html.Settings.ConfigurationSectionTemplate.SetConfiguration(RsopTargetResults targetResults)
       at Microsoft.GroupPolicy.Reporting.Html.Rsop.RsopReportTemplate.SetRsop(Rsop rsop)
       at Microsoft.GroupPolicy.Reporting.Rsop.ConvertToHtml()

    Thursday, January 12, 2012 12:18 PM
  • *BUMP*

    Still not fixed !!!!

    Wednesday, November 27, 2013 2:49 PM
  • Almost 9 years later in 2012 R2 and still not fixed.

    I stumbled upon this thread after pulling out every single hair on my head due to frustration.

    And whats even more frustrating is that when I want to Delete and Recreate them, the MMC always crashes, even when executed on different DC's or devices with the RSAT tools installed.

    So dear Microsoft... Please fix this !!

    Kind Regards,

    Maarten

    Friday, December 28, 2018 9:53 AM