how can i create a performance counter in scom using powershell
i have the data which is retrieved from azure website but i need to plot that data as performance in the scom console but how can i do that,  i know little about creating a powershell script in the scom but how do i create performance counter
November 19th, 2014 8:06am

Please refer to the following blog, Brian Wren develop a powershell script to retrieve SCOM performance data

https://gallery.technet.microsoft.com/scriptcenter/Retrieve-Performance-Data-c4595e2a

Roger

Free Windows Admin Tool Kit Click here and download it now
November 19th, 2014 8:54am

its not about retreiving,its about creating a performance counter in scom using powershell,i have used the following script but it has  no effect its not creating any performance counter in scom can some help me doing this

 $api = new-Object -ComObject 'Mom.ScriptAPI'
    $bag = $api.CreatePropertyBag()   
    $bag.Addvalue('LocationName', 10)   
    #$api.Return($bag)


  • Edited by Suresh Gaddam Wednesday, November 19, 2014 10:44 AM
  • Proposed as answer by Chinna2580 Tuesday, February 03, 2015 7:50 AM
November 19th, 2014 10:44am

its not about retreiving,its about creating a performance counter in scom using powershell,i have used the following script but it has  no effect its not creating any performance counter in scom can some help me doing this

 $api = new-Object -ComObject 'Mom.ScriptAPI'
    $bag = $api.CreatePropertyBag()   
    $bag.Addvalue('LocationName', 10)   
    #$api.Return($bag)


  • Edited by Suresh Gaddam Wednesday, November 19, 2014 10:44 AM
  • Proposed as answer by Chinna2580 Tuesday, February 03, 2015 7:50 AM
Free Windows Admin Tool Kit Click here and download it now
November 19th, 2014 10:44am

Just map your data using performance mapper condition detection module.
November 20th, 2014 4:38am

Hi,

To create performance counters please refer to the links below:

Use PowerShell to Create and Update Performance Counters

http://blogs.technet.com/b/omx/archive/2014/04/23/use-powershell-to-create-and-update-performance-counters.aspx

Creating Performance Collection Rules in SCOM 2012 with PowerShell

http://blogs.msdn.com/b/rslaten/archive/2013/06/02/creating-performance-collection-rules-in-scom-2012-with-powershell.aspx

Regards,

Yan Li

Free Windows Admin Tool Kit Click here and download it now
November 20th, 2014 5:43am

Hi Yan Li,

Cant we directly create performance counter in scom using powershell ?

I have tried those,but i need to create directly in the scom, Is it possible to do so ?


November 20th, 2014 6:04am

Hi Yan Li,

Cant we directly create performance counter in scom using powershell ?

I have tried those,but i need to create directly in the scom, Is it possible to do so ?


Free Windows Admin Tool Kit Click here and download it now
November 20th, 2014 6:04am

Hi Yan Li,

Cant we directly create performance counter in scom using powershell ?

I have tried those,but i need to create directly in the scom, Is it possible to do so ?


No, you can't. This template can create monitor for cscript.exe (js/vbs). But you can find in internet management pack which can add powershell template.
November 20th, 2014 5:07pm

I found only powershell monitor,can you please provide those links?

thanks & Regards,

Suresh Gaddam

Free Windows Admin Tool Kit Click here and download it now
November 21st, 2014 7:47am

Hi Vladimir,

I have found the solution by creating a custom management pack using MP Author i used a rule to execute powershell script and it is working like a charm.

Thanks & Regards,

Suresh Gaddam

December 17th, 2014 7:04am

Hi Suresh

I know this post is old, but maybe you will comment on which Data Source you used? And maybe even post a sample solution?

Thanks

Michael

Free Windows Admin Tool Kit Click here and download it now
March 26th, 2015 12:20pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics