Configure Perfmon with PowerShell Script

Hi,

I’m new to PowerShell and I would like to monitor servers where instead of configuring a Perfmon on each server. I can run the PowerShell script only once at the start and PowerShell script Automatically configures Perfmon steps.

  1. Auto creates Data Collector Set >> Create manually(Advance) >> Create data logs(Performance counter) >> Sample Interval >> Root Directory (Setup) >> Finish
  2. Configure the time in the script when to run it.

Is it possible to do 1 and 2 with PowerShell script?

I would greatly appreciate, if someone can help me out or guide me in the direction.

Thanks,
Chigz

Chirag,
Welcome to the forum. :wave:t4:

What have you tried so far? We expect you to make an own attempt to get your task done or to solve your problem. If you have done so already please document here what exactly you have done and show your code. Then we probably might be able to help you step further.

I used the topic of your question to search for it on google and found some promissing results:

https://www.google.com/search?q=Configure+Perfmon+with+PowerShell+Script&oq=Configure+Perfmon+with+PowerShell+Script

Please keep in mind … This forum is for scripting questions rather than script requests. We do not write customized and ready to use scripts or solutions on request.

Hi @Olaf

Thank you for your message. so far I have tried logman utility which allowed me to get me started and automate some of the feature of perfmon configuration. not completed as I am still trying to work out how can I run this everyday starts at 00:01am and ends at 11.59pm.

PS C:\PowerShell Scripts> logman.exe create counter chiragtest -f bincirc -max 666 -si 00:00:01 -c “\Memory*” “\Network Interface()*" "\Processort()*”

I have managed to export counter in XML file and trying to figure out writing a script which can call XML file from the script and Install counter on multiple servers.

Hmmm … unless you have any PowerShell code to share I’d say that’s more of a logman issue than a PowerShell issue. You may be better off in a logman related forum.

Do you have any specific question about a particular piece of PowerShell code you wrote?