Task Scheduler not triggering email of huge size RRS feed

  • Question

  • Hi All,

    We have developed a PowerShell script that fetches groups from FIM portal expiring in a quarter and trigger email notifications to the group owners. This script works fine when executed in PowerShell console. But when we make this script as part of Windows Task Scheduler, it does not trigger email notification. No errors logged in History tab of the task nor event viewer. We are currently trying with 10K groups which are owned by 10K different owners. The functionality is to send 1 email notification with all 10K recipients in TO list of the email notification.

    When I narrow down the filter to fetch fewer groups like ~4K groups in the script and then execute the Task Scheduler it triggers the mail notification.

    Any help or clue would be appreciated.



    Wednesday, December 7, 2016 5:05 AM

All replies

  • Hello Veena,

    Below are a few ideas off the top of my head given the scenario you described:

    1. Ensure that the scheduled task setting "Stop the task if it runs longer than:" is set high enough to allow the scheduled task to complete.

    2. This could be a timeout issue with the FIM Service or something with the email being sent to 10K users. Update the script to add additional logging (e.g. Try/Catch or Start-Transcript/Stop-Transcript). Also, you can update the script to write all of the information gathered out to a log file instead of trying to email it to ensure all of the data needed is being gathered successfully by the script when it is triggered from the Task Scheduler.


    Wednesday, December 7, 2016 6:00 AM
  • Hi Jordan,

    Thanks for your suggestions.

    Regarding the first point, I have set the "Stop the task if it runs longer than:" to 3 days.

    Regarding 2nd point, I have gathered all the email address out in a file and it looks good to me.

    I am wondering if Task Scheduler is capable of sending mail notification of huge size? Because I see it working perfectly for 4K recipients but does not work for 10K recipients. Kindly suggest



    Wednesday, December 7, 2016 6:46 AM