1

In performance Monitor, I'm looking for a way to compress my data collection (*.blg file) when the collection has reached the stop condition.

Looking at the "Data Collector Sets" properties there this task tab which seems to perfectly fit my needs, but I don't manage to make it working properly.

Data Collector Sets Task Tab

What I manage to do is trigger a "Task Scheduler" task but I don't understand how to pass the arguments (here {usertext} {logs}) to the script within this task.

Digging on Microsoft website I'm ending up in this doc which says

You can run a Windows Management Instrumentation (WMI) task upon completion of the Data Collector Set collection by entering the command in the Run this task when the data collector set stops box. Refer to WMI task documentation for options.

And looking at the WMI task documentation which doesn't help me much how I can interface this with a Data Collector.

Does anyone has already use this functionality ? Is this even doable to trigger a script with argument from perfmon ? Any input would be much appreciated to understand the logic behind this.

Platform: Windows 10 Windows Server 2012

Hope I'm clear enough Matth

1 Answers1

1

Better late than never, I guess.

Just put $(Arg0) and $(Arg1) into the "Add arguments" field in the "Action" tab of the scheduled task you've already created:

example

$(Arg0) will become {usertext}, $(Arg1) will become {logs}.