How can I add SCOM 2012 Alert Context within a SCOM Alert When using a cusom powershell script in a two state monitor?

Hello, we have a two state monitor and I would like to channel the Alert Context to Alert Description.
The powershell script being used to find the stopped services is pasted below:
$API = new-object -comObject "MOM.ScriptAPI" 
$bag = $api.CreatePropertyBag()
$ServiceStatus = Get-WmiObject -class win32_service |where {$_.startmode -eq'Auto'-and $_.State -eq 'Stopped' -and
$_.name -ne 'wuauserv'}
if (!$ServiceStatus) #if there are no automatic services that are stopped, we are healthy.
write-host "good"
$bag.addvalue("State","good")
if ($servicestatus) #if there are any automatic services that are stopped, we are unhealthy.
write-host "bad"
$bag.addvalue("State","bad")
foreach ($service in $servicestatus) #enumerate the stopped services
$bag.addValue("$($Service.Name):","$($Service.state)")
$bag
$API.Return($BAG)
The results of the services that are stopped are being captured in the Alert Context”. How can I pipe the Alert Context to “Alert Description” to obtain a meaningful alert?
Alert Context data:
Property Name                              Property Value
State                                                  
bad
clr_optimization_v4.0.30319_32: Stopped
clr_optimization_v4.0.30319_64: Stopped
How can I pipe to Alert Description in SCOM 2012?
Thanks,
Kapil Dham
Kapil Dham

you don't need write-host
you should create
$bag.addvalue("ServiceName1","StateOK")
$bag.addvalue("ServiceName2","StateStopped")
and in alert description you will see
ServiceName1  
StateOK
ServiceName2  
StateStopped
So try $bag.addValue($Service.Name,$Service.state)
and $Data/Context/Property$

Similar Messages

  • Elements 11 vs 13: how can I add a new place tag to my PSE13 database without using the wretched and totally inadequate map technology  that Elements 13 wants to impose.

    HI,
    I have recently installed Elements 13 having used Elements 11.0 successfully to build a database of 30,000 plus images indexed by place, people, and photo date. Elements 11 allowed me to add new places which are meaningful to me but which are a complete mystery to the mapping technology of Elements 13. For example some years ago I lived in London in a road called Argyle Road. In elements 11 I could enter the place tag as Argyle Road. In Elements 13 I am required to locate Argyle Road on the map, but the map presupposes that the Argyle Road I am referring to is in Ealing in West London. It is not!
      I now live in a place called Broadsands but the Elements 13 Map places this 0.5 miles away from what I would describe as Broadsands.
      So the question: how can I add a new place tag to my database without using the wretched and totally inadequate map technology  that Elements 13 wants to impose.

    Thank you for your quick response, BalusC. I really appreciate your answer.
    Yes, you are right. If I manually code the same amount of those components in the JSF pages instead of generating them dynamically, the server will still run out of memory. That is to say, JSF pages might not accommodate a great deal of concurrent visiting. If I upgrade the server to just allow 1,000 teachers making their own test papers at the same time, but when over 2,000 students take the same questionnaire simultaneously, the server will need another upgrading. So I have to do what you have told me, using JS+DOM instead of upgrading the server endlessly.
    Best Regards, Ailsa

  • How can I add more than one submit button in a jsp without use of javascrip

    I want to add more than one submit button in a jsp without use of javascript

    you can do add multiple submit button with this way
    <input type="submit" value="Previous" />
    <input type="submit" value="Next" />
    <input type="submit" value="Finish" />

  • How can I solve a "org.jvnet.mimepull.MIMEParsingException: Missing start boundary" when using "Page Attachments to Disk"?

    I have built a streaming MTOM enabled web service for downloading large files. I also built a client that uses that service (with MTOM and streaming feature). Everything works, when the client calls the web service directly.
    Then I have set up the OSB, so that I can call the service through the OSB. I have build a Business Service and a Proxy Service. For the Business Service, I use "XOP/MTOM Enabled", "Include Binary Data By Reference" and "Page Attachments to Disk" to prevent the OSB from loading the whole data into memory.
    If I do not use the "Page Attachments to Disk" option, the download works, but I assume everything is loaded into the OSB memory.
    When I use the "Page Attachments to Disk" option, I receive the following error message
    Exception in thread "main" com.sun.xml.ws.fault.ServerSOAPFaultException: Client received SOAP Fault from server: Couldn't create SOAP message due to exception: org.jvnet.mimepull.MIMEParsingException: Missing start boundary Please see the server log to find more detail regarding exact cause of the failure.
        at com.sun.xml.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:193)
        at com.sun.xml.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:131)
        at com.sun.xml.ws.client.sei.StubHandler.readResponse(StubHandler.java:253)
        at com.sun.xml.ws.db.DatabindingImpl.deserializeResponse(DatabindingImpl.java:203)
        at com.sun.xml.ws.db.DatabindingImpl.deserializeResponse(DatabindingImpl.java:290)
        at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:119)
        at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:92)
        at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:161)
        at com.sun.proxy.$Proxy38.fileDownload(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at weblogic.wsee.jaxws.spi.ClientInstanceInvocationHandler.invoke(ClientInstanceInvocationHandler.java:87)
        at com.sun.proxy.$Proxy39.fileDownload(Unknown Source)
        at largefiletransfer_osb_client.MtomClientDownload.main(MtomClientDownload.java:59)
    Why do I get this exception and how can I solve the issue?
    Additional Infos:
    OS: Windows 7 64bit
    Tool: JDeveloper BPM Suite 12.1.3.0.0
    WebService: HTTP + SOAP + MTOM + Streaming

    I have built a streaming MTOM enabled web service for downloading large files. I also built a client that uses that service (with MTOM and streaming feature). Everything works, when the client calls the web service directly.
    Then I have set up the OSB, so that I can call the service through the OSB. I have build a Business Service and a Proxy Service. For the Business Service, I use "XOP/MTOM Enabled", "Include Binary Data By Reference" and "Page Attachments to Disk" to prevent the OSB from loading the whole data into memory.
    If I do not use the "Page Attachments to Disk" option, the download works, but I assume everything is loaded into the OSB memory.
    When I use the "Page Attachments to Disk" option, I receive the following error message
    Exception in thread "main" com.sun.xml.ws.fault.ServerSOAPFaultException: Client received SOAP Fault from server: Couldn't create SOAP message due to exception: org.jvnet.mimepull.MIMEParsingException: Missing start boundary Please see the server log to find more detail regarding exact cause of the failure.
        at com.sun.xml.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:193)
        at com.sun.xml.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:131)
        at com.sun.xml.ws.client.sei.StubHandler.readResponse(StubHandler.java:253)
        at com.sun.xml.ws.db.DatabindingImpl.deserializeResponse(DatabindingImpl.java:203)
        at com.sun.xml.ws.db.DatabindingImpl.deserializeResponse(DatabindingImpl.java:290)
        at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:119)
        at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:92)
        at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:161)
        at com.sun.proxy.$Proxy38.fileDownload(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at weblogic.wsee.jaxws.spi.ClientInstanceInvocationHandler.invoke(ClientInstanceInvocationHandler.java:87)
        at com.sun.proxy.$Proxy39.fileDownload(Unknown Source)
        at largefiletransfer_osb_client.MtomClientDownload.main(MtomClientDownload.java:59)
    Why do I get this exception and how can I solve the issue?
    Additional Infos:
    OS: Windows 7 64bit
    Tool: JDeveloper BPM Suite 12.1.3.0.0
    WebService: HTTP + SOAP + MTOM + Streaming

  • How can I improve the quality of a photo that appears blurry when used in iMovie but not in iPhoto?

    A 320 x 240, 35 KB Jpeg file looks crisp and in focus in iPhoto.  But as soon as I put it into iMovie and hit full screen, it's blurry and looks terrible.  A photo taken with my Nikon D7100, a 3872 x 2582, 2.5 MB Jpeg photo translates to the big screen just fine, with perfect clarity.  How can I use this former picture but increase its clarity when it's magnified in iMovie?

    Apologies for opening this up again:
    I rasterised and embedded the photos, liked what I saw and marked the question as answered, then I zoomed out and lo! The white jaggedy edges are back! This is despite the fact I rotated them to vertical before rasterising them.
    It appears that the pixels in the rasterised image are relative to the screen, not relative to the object... so when I rotate the photo it goes back to the original hi-res photo and re-rasterises it to fit the new orientation.
    Also doing this has not lowered the filesize at all... It does appear that when you rasterise an image in Illustrator, the new raster is only a veneer, the original (hi-res photo) is still lurking in the background.

  • How can I add a header to a text file without mapping? [Using only ID]

    Hi Experts,
    I am doing a scenario in which I want to add a dynamic header to a text file, due to the complications related to the structure, I dont want to create a message type, data type etc so I cant use mapping.
    I want to do all the manipuations in Integration Directory itself.
    Can you all please help me out in this?
    Thanks in advance
    Thomas

    Hi  Experts,
    I am new to XI, so only elaborate answers would help me
    This is the specific requirement i want;
    There is a 'source text file' which is a collection of 1000+ records, I want to make a 'target file' which is a combination of 2 fields, one field will be the dynamically generated name [for the target file] and the other field will be the whole 'source file' content.
    From the last response for my question, I understand the dynamic file generation part can be done using java mapping.
    Is there anyway by which I can get in the whole content of the source file into a field in the target file?
    Thanks in Advance
    Thomas

  • How Can I Add a Blog (WordPress or Other) to my Website That Uses DWCS3 Template with PVII Plugins

    I want to create a blog and have it work within an already
    created website page <
    http://blog.myt4w.com>. I
    am not sure if this is possible since I was told that WordPress
    would not likely work with Project Seven Pop Menu Magic navbar
    plugin. Also it seems really complicated making a WordPress theme
    that will be identical to my site look and feel. Any ideas on how
    to do this in a way that is easier than creating a custom WordPress
    Theme? Or any other good ideas for putting a fully functioning blog
    within a website template page? Thanks!
    Dante

    Using the ThemeDreamer extension for Dw, you can navigate a
    theme file in Dw's Design View while seeing 'what from where' in
    Code View. Its the easiest way to customize a WordPress theme file
    without having mess with a server. You can work offline and unlock
    Dw's design tools. Without it, Dw is pretty much just another text
    editor for WordPress theme files.
    http://www.themedreamer.com

  • How can I add a new vaiable to the file loaded by Property Loader without changing my script

    I have an input file to my script that I load via Property Loader. The number of parameters in the input file may change from test to test.. Is it possible in some way to add a new parameter without changing the sequence file?
    Is there for example a way to make the Property loader read parameters until end of file, and put the parameter into a temporary variable in my script?
    Hope there is a way to resolve this.
    Cheers
    Claus Christophersen

    Claus,
    The solution you have is a valid one.
    Basically you have a variable (global or local) and you import the expected parameter to this variable before you pass it to the hardware.
    You use that variable as the input parameter you pass to your hardware of course.
    You have to modify your source file depending on the test type you want to execute every time you want to change the test type though.
    Another solution would be to use Data Markers in your file to separate the variable values corresponding to each test type.
    Check the example I am attaching.
    At the beginning I prompt the user for the Test Type (Type I or Type II).
    Based on the type, I import the corresponding variables from the source file using Data Markers.
    If you have questions let me know.
    Attachments:
    SourceFile.zip ‏8 KB

  • How can i get firefox to remember my user name and password when useing email?

    Everytime i want to log into my email,i have to type in my details.I used Firefox before on a previous pc and i was asked if i would like Firefox to remember these.That is not happening this time.Please can you help?Thanks

    * Websites remembering you and automatically log you in is stored in a cookie.
    * You need an allow cookie exception (Tools > Options > Privacy > Cookies: Exceptions) to keep that cookie, especially for secure websites and if you let cookies expire when Firefox closes
    * Make sure that you do not use [[Clear Recent History]] to clear the "Cookies" and the "Site Preferences"
    Clearing "Site Preferences" clears all cookies, images, pop-up windows, software installation, and password exceptions.
    See also:
    * http://kb.mozillazine.org/Cookies

  • How can I open a file and get the data inside  file when using  WebStart

    When I use ClassLoader,
    Which methold can I use the read the information inside that file?
    Thanks
    Ryan

    Assuming you are trying to read the jar file.
    http://forum.java.sun.com/thread.jspa?forumID=22&threadID=572955
    rykk

  • How do I turn off all alerts when using phone

    It is very annoying when i'm using phone feature to hear alerts for games, text messages, FB, etc.  Is there a way to turn all of these off when I am using phone feature?

    Flip the Ring/Silent switch while on a call.

  • How can I add the attachment list pdf file context to purchase order ?

    Dear all,
           I have use services for object in ME22N to attach PDF file to purchase order,I want to know how can I add the pdf file context to purchase order when I send the purchase order to vendor.
    Thanks in advance
    Best regards,
    Merry

    hi,
    attach document through Service for Object button. Service for Object button available down side of Command screen ( in your PO screen ME22N ) .
    Click your Service Object button -> Create -> Create attachment 
    then select your window directory ( which file you need to attach) select your file Now your system shows message  Service "Create attachment" is started. 
    Save again your PO. You can see (open) your attachment in same field ( Service for Object ) select and Create and check attachment list. You can attach as many document in your PO.

  • Can i add a sound alert or message when someone comments on a pic of a photo stream when i am only another participant (not owner of the photstream)?

    Hi,
    How can i add a sound alert or message when someone comments on a pic of a photo stream when i am only another participant (not owner of the photstream)? Thank you. Joana

    Joana,
    that should be automatic.
    See: http://help.apple.com/iphoto/mac/9.4/#pht884a8908
    When you like or comment on a photo in a shared stream, a notification is sent to all the Apple devices of the photo stream’s creator and subscribers. You can delete comments you added to a photo by placing the pointer over the comment and clicking the Delete button that appears.
    Usually the problem is the other way round - how to prervent spamming all subscribers to a shared stream from being alerted to each comment on a photo in the stream. Quite a few subcribers have cancelled their subscriptions to shared streams, because they have continously been sent alert messages and could not disable them. It can get rather annoying - there is no way to silently add a few comments to photos and then send only one alert.

  • How can I add a second authorized user to my installation of Adobe Digital Editions?

    I have initially installed with one user.  I have purchased a digital book using my credit card and id from Barnes & Noble.  I can't open the content without proper ADE authorization.  How can I add another user authorization to ADE?

    Paul, if you used one ID to install ADE, you cannot download an ebook from
    a site into ADE if you used a different ID.  That's the way the Digital
    Millenium Copyright Act of 2000 was implemented to prevent unauthorized
    copying of ematerials.  ADE tells you that in its HELP section.  You can't
    add a second ID to ADE either, for the same reason.
    What you CAN do is to change users, and authorize ADE with the same ID you
    used when you downloaded the ebook.  You do this by bringing ADE up, then
    using the CNTLSHIFTD key combination, you will deauthorize ADE.  Close
    ADE and reopen it, and ADE should ask you to authorize it.  At this point,
    you can enter the second ID, and ADE will take off from there.  BUT, keep
    in mind that any other ebooks you downloaded into ADE with the first ID
    will not be accessible until you go through the same process again and
    revert to the first ID.
    Hope this helps!
    =============

  • HT5439 i can't access my university anyway, how can i add username and password?

    i try to use this solution to apply my university proxy, but it dodn't work. Can u suggest me more about how can i add username and password?

    You should be able to use the OpenVPN Connect app running on your iPad to connect your iPad to the VPN directly. It is an official OpenVPN client for iOS devices.
    In what way is it "not compatible"? Have you tried it? Tunnelblick is an OpenVPN client, so your school's VPN is using the OpenVPN protocol. That means any OpenVPN client should be able to access it. (It is possible, but unlikely, that your school uses encryption that is not available on the iPad, but that would be very unusual.)
    Otherwise, a remote control app on your iPad would let you control your Mac at home. "Back to My Mac", for example, would allow you to control your Mac remotely. The tricky part of this is that usually a VPN is set up to send all Internet traffic via the VPN server, and I'm not sure how that would work with "Back to My Mac".

Maybe you are looking for

  • Music from music library will no longer sync with my Apple TV

    purcheased Applet TV a few months ago and set it up to play our music from our Mac Pro.  Everything was wonderful, but for no reason it will no longer play our music?  Have rebooted computer.  Have signed out and signed back in to Apple TV.  Still no

  • IPlanet sticky load balancing question

    We have two iPlanet Application Servers v6.0 sp3 and two iPlanet Enterprise Web servers v4.1. All machines are on the same domain name. All machines point to the same LDAP server. The application has been installed on both App servers. Clustering has

  • Problem with vat in invoice

    Hi all I have the following situation in one of my invoice Payer: DOMESTIC Bill to: DOMESTIC Sold to: FOREIGN In our company only domestic customer need to pay vat When i produce the invoice it came out with VAT ;  0.00 As I know what determine the c

  • Mail - error from certain keys

    After upgrading to 10.4.5 I have the following symptoms in mail.app Typing into a new email only works for the letter keys. If I hit space bar or return the cursor leaves the text pane. Clicking the cursor back in place with the mouse I can start typ

  • 5.0.1 my iPhone  battery seems to be better...still showing 100% after 1 hrs standby and 15 mns usage

    5.0.1 my iPhone  battery seems to be better...still showing 100% after 1 hrs standby and 15 mns usage