unable to schedule custom data collector set at startup RRS feed

  • Question

  • i am trying to learn how to use the windows performance monitor with the task scheduler.

    i want to run a performance monitor user defined data collection set at system startup using the task scheduler.

    i made a user defined data collector set in the performance monitor,
    then i found that data collector set in the task scheduler's task scheduler library, microsoft, windows, PLA folder,
    and I scheduled it to run at system startup.

    However, even though the task's last run time in the task scheduler shows that it ran when the system restarted, 
    there is no new entry in the reports section of the performance monitor.

    If I run the data collector set manually in the performance monitor, that creates a new entry in the reports section, but if i restart the pc then no new entry is made.

    I cannot figure out why...I've gone through several suggestions online, and as far as i can tell I have made all of the settings correctly

    can anyone tell if I am doing something wrong, or if I am missing a certain step?

    Tuesday, October 31, 2017 4:45 AM

All replies

  • Hi,

    How did you configure this setting at Task Scheduler?

    What's the exact Windows version?

    I have configured Task Scheduler with my Windows 10 version 1607 successfully which could auto start performance monitor with user defined data collection, and generate log file in report. 

    Please try to create some screenshots for all of your steps and upload them to OneDrive, then paste the link here for analyze.


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact

    Wednesday, November 1, 2017 9:35 AM
  • Hi,

    Any update?

    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact

    Friday, November 3, 2017 2:36 AM
  • Hi,

    the problem occurs after update the Windows 10 version 1607 to a newer version

    I tried it today,

    on 1607 => successfull

    on 1703 => failed

    on 1709 => failed

    the difference between the creation of the task for the scheduler are in the action that will be executed

    on 1607

    <Actions Context="Author">
        <Arguments>C:\Windows\system32\pla.dll,PlaHost "DataCollectorSet" "$(Arg0)"</Arguments>    </Exec>

    on 1703

    <Actions Context="Author">

    Friday, March 2, 2018 2:41 PM
  • Really still could not solve this problem?
    Tuesday, July 30, 2019 7:53 PM
  • It looks like the change that Microsoft change to Schedule Task/Perfmon is using a variable.  

    A simple test I tried was starting the task using Run on demand.  If I start the Data collector set from Perfmon, the Schedule task would change from Ready to Running.  But I could not use the same scheduled task to start the Data Collector. 

    The error I would get is Data collector set $(Arg0) failed to start as Domain\PC$ with error code 0x80300002.  

    That error value is PLA_E_DCS_NOT_FOUND / The data collector set was not found .

    What it looks like is the new method wants to pass a variable which holds the Data Collector set name ($Arg0).  So if you use Perfmon to start, the variable is passed and task scheduler is happy.  But trying to start with task scheduler the variable most likely doesn't exist (makes sense) and is empty.

    The workaround:

    1. After you create a new data collector in Perfmon go into Task Scheduler Windows PLA section and export the task that was created.
    2. Import the task your just exported into the top level of Task Scheduler.   
    3. Add your trigger, be "startup", "logon", or schedule.
    4. For Actions, choose the New... button.
    5. Select start a program.
    6. %windir%\System32\logman.exe (use full path in case the client machine has path issues)
    7. add arguments: start "Data Collector Set Name Here".  (Use quotes to deal with spaces)
    8. Delete the "Custom Handler" Action.
    9. Review the Conditions and Settings tab.  (Verify the "stop the tasks if it runs... option is NOT checked"

     This is the only way I have been able start Perfmon Data Counters by using a schedule task on Win10 1809.

    Friday, September 20, 2019 2:33 PM
  • Hello JWalker17, 

    thank you for that reply, i will try that very soon.
    and thank you everybody else for all the older replies, i have been away from this for a long time.

    Can I ask a different more fundamental question about the windows event viewer, possibly to JWalker17 as you explain your self very well and seem very knowledgeable about windows inner workings.

    Do all programs make entries in the windows event log?
    e.g. when they open, or if they have an error?

    and if so, where are they?
    e.g. i started the program "freesshd server" on a win10 professional pc, and it seems to have started normally, but when i look in the windows event viewer logs (eg the application log or any other log), i don't find an entry saying something like "freesshd just started".

    I know thats shifting gears a bit, but i need to move in direction of understanding the event viewer first.

    thank you very much (in advance), 

    Tuesday, September 24, 2019 1:29 AM
  • Sorry to bump on an old post. 

    I too had the same problem, even a couple of years after this has been posted. I found out that this continues to be a common problem - Windows 10 even the current build cannot start a Data Collector Set from Task Scheduler. It doesn't matter if your trigger is set to Startup or anything else. Even manually triggering it will not start the Data Collector set.

    I have posted on the forum as well before I found this.

    I have found a way around it. You can create a normal Scheduled task that runs this simple PS script. Just save the code below as a .ps1 file and set your Action to run powershell -file c:\path\to\script.ps1

    The DataCollectorSetName is the actual name of the Data Collector Set you want to start.

    $datacollectorset = New-Object -COM Pla.DataCollectorSet

    Then set your Trigger to At system startup

    You're done. Test by restarting the machine. It should call that script upon startup and start the Data collector set along with it. 

    Wednesday, December 11, 2019 8:24 PM