Hi all, I'm curious if the following is possible. I know that using Powershell you can access and read PERFMON counters. But what if you have a Powershell script that does some activity that needs to log data into a custom counter?
For example, let's say that I want to write a Powershell script that processes files in a specific way. I want to be able to log the results of a batch process into a counter that can be watched by PERFMON or a third-party monitoring tool that can read these counters. The Powershell script would need to be able to create a new object for the job name and two counters for that object (Elapsed Time and Files Processed), then write the values to those counters. Of course ideally it would verify the existence of the object/counters and then create it if they did not exist.
Am I dreaming here?
________________________________________
CompTIA A+, Network+, Server+, Security+
MCTS:Windows 7
MCSE:Security 2003
MCITP:Server Administrator
MCITP:Enterprise Administrator
MCITP:Virtualization Administrator 2008 R2
Certified Quest vWorkspace Administrator
For example, let's say that I want to write a Powershell script that processes files in a specific way. I want to be able to log the results of a batch process into a counter that can be watched by PERFMON or a third-party monitoring tool that can read these counters. The Powershell script would need to be able to create a new object for the job name and two counters for that object (Elapsed Time and Files Processed), then write the values to those counters. Of course ideally it would verify the existence of the object/counters and then create it if they did not exist.
Am I dreaming here?
________________________________________
CompTIA A+, Network+, Server+, Security+
MCTS:Windows 7
MCSE:Security 2003
MCITP:Server Administrator
MCITP:Enterprise Administrator
MCITP:Virtualization Administrator 2008 R2
Certified Quest vWorkspace Administrator