How can i use azure cmdlets in scom management pack scripts

i want to show some of azure web site metrics in the scom console so i have script which gets the data from azure portal 
how can i use that script in the scom management pack 
[void][system.reflection.Assembly]::LoadFrom(“C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ServiceManagement\Azure\Automation\Microsoft.WindowsAzure.Common.dll”)
$value=Get-AzureWebsiteMetric -Name "openemrmysql" -MetricNames "Http2xx" -TimeGrain "PT1M"
$API = New-Object -ComObject "MOM.ScriptAPI"
$PropertyBag = $API.CreatePropertyBag()
$result=$value.Data.Values
foreach($result in $value)
$global:totalvalue=$result.value.Total -as [int]
$PropertyBag.AddValue("AzureActive","AzureActive")
$PropertyBag.AddValue("Active", $global:value)
$PropertyBag
i have included this script in the management pack and it is not creating any counter in the scom console.
Can any one help me,
thanks & Regards,
Suresh Gaddam

Hi,
I would like to suggest you check articles below to get more information about PowerShell Scripts in a Management Pack:
http://blogs.technet.com/b/brianwren/archive/2008/02/20/running-powershell-scripts-from-a-management-pack.aspx
http://blogs.technet.com/b/brianwren/archive/2009/06/04/powershell-scripts-in-a-management-pack-part-2.aspx
Regards,
Yan Li
Please remember to mark the replies as answers if they help and unmark them if they provide no help.

Similar Messages

  • How can I use Azure in Iran?

    I live in Iran and I can't use microsoft azure. what should I do?
    <h1>help<h1>

    Hi Mohsen,
    Iran is not available as an option for buying an azure subscription for now. see
    In which countries/regions is Azure commercially available?  .
    But as an alternate, you may try buying the near by region from the list above and try azure subscription with an International credit card.
    Lets us know if this helps.
    Regards,
    Shirisha Paderu

  • How can I use Pages 4.3 (from Retail pack) template on Pages 5.2 (from Mac App Store)?

    This is a new machine running on Mavericks bought last year since my old Mac had a hard-drive failure. Installed Pages (part of iWork '09 package), updated to Pages 5.0 from the Mac App Store and no issues. However, now I need to use some of the old Pages template (San Fancisco Letter to be specific) and the new Pages dosn't have that.
    So I had to extract the San Fancisco template from Pages '09 and tried installing under 'My Template' on Pages 5.3. But evertime I'm getting an error while installing. That's when I realised after going through the discussions here, that I can't install a Pages '09 template on Pages 5.3.
    So my question is how to use a Pages 4.0 template on Pages 5.3? Is it possible to install Pages 4.3 while Pages 5.2 is still installed? Is there a workaround?
    Note: I don't need Pages 4.3 but would like to use some of the templates from there, working on Pages 5.2.
    Thanks in advance - Sid

    Due to the huge number of missing features in v5.2 that were functional in Pages ’09 v4.3, many of the older version templates expect features/functionality that simply do not exist in v5.2. You should realize that Pages v5 is a brand new application/design, and not a progressive version enhancement to Pages ’09.
    When you updated to Pages v5, that process automatically moved Pages ’09 v4.3 into /Applications/iWork '09. You can continue to use the older Pages (and associated custom templates) on Mavericks.
    I would resist removing Pages ’09 from your machine, as it is functionally superior to Pages v5.
    Templates that you save with Pages ’09 v4.3 are kept in ~/Library/Application Support/iWork/Pages/Templates/My Templates
    Templates that you save with Pages v5+ are kept in ~/Library/Containers/com.apple.iWork.Pages/Data/Library/Application Support/User Templates
    One of the things that I noticed about the original Pages v5 installation is that it transferred a small subset of My Templates from Pages ’09 into the above User Templates location. These were relative simple templates. The complicated ones did not migrate.
    Be certain to make a backup copy of any Pages ’09 template document. Once you open it in Pages v5+, it can no longer be opened in the older Pages application. Providing the template is compatible with Pages v5+, perform a File > Save as Template... to the default location.

  • How can I use java with DMI(Desktop Management Interface)? Help please..

    I want to use Java to develop DMI. Please help...Thanks.

    You are not getting replies because your question may need a course to answer. Just like, hey, can someone tell me how to write an email application? Or,
    Can someone show me how to build a house?
    Start writing your application, when you get stucked, post your questions.
    Or, at least be more specific. Like, elaborate DMI and things like that.
    Do a search on DMI, you may find what you need.

  • Recommded configuration value for Threshold in UnitMonitor for monitoring in SCOM management pack

    Hi,
    Kindly let me know the recommded configuration value for <Threshold> in <UnitMonitor> used for monitoring in SCOM management pack configuration. How the threshold value is affected.
    regards
    SCOMDev
    SCOMDev

    Hi,
    Please refer to the following documents:
    Performance Monitors
    http://technet.microsoft.com/en-us/library/ff629408.aspx
    Overview of Available Monitor Types
    http://technet.microsoft.com/en-us/library/dd440880.aspx
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • How can I make Azure blob give me "206 Partial content" for mp4. Getting 200

    I want a video for my web-site, so I am using html+JavaScript found on view-source:https://www.airbnb.com/ 
    see id="pretzel-video"
    and script starting from   var video = $("#pretzel-video");
    The point is - if I copy html+JavaScript on my web-site, I can get "206 Partial content" from  airbnb.com, i.e. the video hosted on airbnb.com starts streaming immediately. 
    The same thing happens if I upload the same video to my domain hosted on arvixe.com and S3 Amazon
    The only provider that doesn't give me 206, but responds with 200 instead is Azure blob
    This is unacceptable, because the user has to wait until all the video is loaded.
    So how can I make Azure blob give me  "206 Partial content". I am hosting web-site on Azure also. 
    I am using airbnb.com video in all three cases to exclude possible errors related to codek etc.

    Hi Chao 
    Azure Blob storage  supports return 206 response if you're using API version 2011-01-18 or later . 
    However if
    don't originate the request which means you can't specify this using the request header , you can set the API version globally
    for blob service within  a storage account by using " Set
    Blob Service Properties" API , 
    If the above still couldn't solve your issue, we suggest you please contact Microsoft Azure technical support for further assistance.
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    Regards,
    Serena Yu
    Microsoft Online Community Support

  • How can I use 2 Apple IDs in Itunes? I have 2 IOS Devices. They each have there own AppleID. What is the proper way to sync both of them to Itunes?

    How can I use 2 Apple IDs in Itunes? I have 2 IOS Devices. They each have there own AppleID. What is the proper way to sync both of them to Itunes? I wanted my teenager's AppleID to be different from mine so that she couldn't charge stuff to my AppleID, therefore I created me another one. Now when I go to Sync either device, it tells me that this IOS device can only be synced with one AppleID. Then I get a message to erase it, not going to do that, lol. If I logout as one ID and login as the other, will it still retain all synced information on the PC from the first IOS device? If I can just log in out of the AppleID, then I have no problem doing that as long as the synced apps, music, etc stays there for both. I am not trying to copy from one to the other, just want to make sure I have a backup for the UhOh times. If logging in and out on the same PC of multiple AppleIDs is acceptible then I need to be able to authorize the PC for both devices. Thanks for the help. I am new to the iOS world.

    "Method Three
    Create a separate iTunes library for each device. Note:It is important that you make a new iTunes Library file. Do not justmake a copy of your existing iTunes Library file. If iTunes is open,quit it.
    This one may work. I searched and searched on the website for something like this, I guess I just didn't search correctly, lol. I will give this a try later. My daughter is not be back for a few weekends, therefore I will have to try the Method 3 when she comes back for the weekend again. "
    I forgot to mention that she has a PC at her house that she also syncs to. Would this cause a problem. I am already getting that pop up saying that the iPod is synced to another library (even though she is signed in with her Apple ID to iTunes) and gives the pop up to Cancel, Erase & Sync, or Transfer Purchases. My question arose because she clicked on "Erase & Sync" by mistake when she plugged the iPod to her PC the first time. When the iPod was purchased and setup, it was synced to my PC first. When she went home, she hooked it up to her PC and then she erased it by accident. I was able to restore all the missing stuff yesterday using my PC. However, even after doing that it still told me the next time I hooked it up last night that the iPod was currently synced with a different library. Hopefully, you can help me understand all this. She wants to sync her iPod and also backup her iPod at both places. Both PCs have been authorised. Thanks

  • How can i use my account without the billing info, as i do not have a credit card. and my shipping and billing info is under US. i'm in singapore. how do i change this?

    how can i use my account without the billing info, as i do not have a credit card. and my shipping and billing info is under US. i'm in singapore. how do i change this?

    If you are just visiting Singapore, then leave the account as it is. If you have moved there, then view your account using the iTunes app on a Mac or PC and change the country/region to your current location and address. If you do not have a bank card, you can fund your account using iTunes gift cards if available in Singapore.

  • How can I use one photo twice in a slideshow

    I am in iPhoto '11 9.4.3 making a slideshow to send to iDVD for my mother-in-laws funeral next Wednesday.
    How can I use this one particular photo of her several times in the slide show.
    I have tried copy/past and that does not seem to work.
    Thanx in advance

    I would just duplicate the picture several times and keep inserting duplicates ...

  • How can i use microsoft word on ipad 2

    how can i use the microsoft application on my ipad 2?

    The Pages app is also compatible with MS Word. Unlike some of the others mentioned, the document is actually stored on the iPad as opposed to 'the clouds'. Again, most of those mentioned are cut down versions of MS Word.
    Stand back and look at this constructively; do you need to regularly access to the document from more than one computer/device without the need to keep amending your document on your computer and sending it to your iPad? If so, Documente to Go etc may be the best choice.

  • How can I use the credit on my account instead of credit card to buy apps?

    I have a gift card credit on my account but when I want to buy an app it takes me to my credit card details. How can I use my credit on my account instead of credit card?

    You shouldn't have to put in a credit card, no, but from time to time the iTunes Store seems for some reason to try to insist on one. If just confirming your mailing address doesn't stop it from complaining, go here:
    http://www.apple.com/support/itunes/contact/
    and follow the instructions to report the issue to the iTunes Store.
    Regards.

  • How can i use one SQL statement to solve problem?

    How can i use one SQL statement to solve the question below?
    For a Table named A, there is a column named F(char type).
    Now select all the records where F like '%00' and update their F value to '%01'
    Just one SQL statement.Do not use PL/SQL block.
    How to do that?
    Thanks.

    What is the data volume for this table?
    Do you expect lots of rows to have '%00' as their value?
    Following two statements come to mind. Other experts would be able to provide better alternatives:
    If you have index on SUBSTR(f, 2):
    UPDATE A
    SET    f = SUBSTR(f,
                      1,
                      length(f) - 2) || '01'
    WHERE  substr(f,
                  -2) = '00';If most of the rows have pattern '%00':
    UPDATE A
    SET    f = SUBSTR(f,
                      1,
                      length(f) - 2) ||
               DECODE(SUBSTR(f,
                             -2),
                      '00',
                      '01',
                      SUBSTR(f,
                             -2));

  • How can i use one iCloud Photostream on 2 devices?

    Due to a bug (or feature) on iOS 8 i can't use the same icloud id on 2 iphones:
    https://discussions.apple.com/thread/6536998
    So how can i use ONE iCloud Photostream then on 2 devices?
    Also, on OSX i can define only one Photostream.
    So, how do you import pictures from 2 streams into iPhoto?
    Familyshare is not usefull as the pictures are not in Original-Filesize!

    Hi ..
    Yes. " iPhone 6 or 6 Plus.  iPad Air 2  or  iPad mini 3"
    Set up and use Apple Pay

  • HT204053 Dear Support Team, every time i tried to logon Icloud its gives me wrong user name or password and at the end it show me error " This Apple ID is valid but is not an ICloud Account" then how can i use one account for same Apple ID and ICloud???

    Dear Support Team,
    Every time i tried to logon Icloud its gives me wrong user name or password and at the end it show me error " This Apple ID is valid but is not an ICloud Account" then how can i use one account for same Apple ID and ICloud?
    Thanks

    It is not possible to create a new iCloud account using a Windows machine. You must create the account using a Mac (10.7.5 or more) or an IOS device (iPhone etc). Once that is done you can sign into and use the account on your Windows machine.

  • How can I use same account in 2 iphone with diff contact list?

    how can I use same account number but other all totally diff such as contact list, application, everything ..... I found that it's bad on IOS5.
    when I used IOS4 .. old verison, I can keep my phone in diff data. Afte upgrade IOS 5, it's bad. Even take photo, it can not focus zoom in and out.

    how can I use same account number but other all totally diff such as contact list, application, everything ..... I found that it's bad on IOS5.
    when I used IOS4 .. old verison, I can keep my phone in diff data. Afte upgrade IOS 5, it's bad. Even take photo, it can not focus zoom in and out.

Maybe you are looking for