Need a Script to find out the Grayed out agents in SCOM 2012

Hi,
I am trying to create a Dashboard view to list the Grayed Out servers in my SCOM 2012 environment by using the script below but it does not work as expected.
Is there something wrong with this script or could you suggest me any other solution please?
#Get all agent objects which are not available (grey)
$agentclass = Get-SCOMClass -Name "Microsoft.SystemCenter.Agent"
$agentobjects = Get-SCOMMonitoringObject -Class:$agentclass | Where-Object {$_.IsAvailable -eq $false}
   foreach ($agent in $agentobjects)
    $dataObject = $ScriptContext.CreateFromObject($agent, "Id=Id,State=HealthState,Display Name=DisplayName", $null)
    #Get the watcher state for the agent
    $watcher = Get-SCOMClass -name "Microsoft.SystemCenter.HealthServiceWatcher"| get-scomclassinstance |  Where-Object {$_.Displayname -eq $agent.DisplayName}
    $dataObject["Watcher State"] = $watcher.HealthState.toString()
    $ScriptContext.ReturnCollection.Add($dataObject)
Thanks
Srini

Try some of these:
Stefan
Maurice
Similar
Topic
Regards, Blake Email: mengotto<at>hotmail.com Blog: http://discussitnow.wordpress.com/ If my response was helpful, please mark it as so, if it answered your question, then please also mark it accordingly. Thank you.

Similar Messages

  • When I scan and save the document to pdf, it comes out complete grayed out.  What did I do wrong?

    When I scan and save the document to a pdf, it comes out completely grayed out.  What did I do wrong?

    Thank you.  I already have that checked.   After an update, it started doing this.   Preferences> Display>Page Content & Info > Show large images is checked.
    It is almost like a protection on the document that grays out all the content.

  • HELP !  why doesn't color picker select specific color ? i make secondary layer and use the tool but no colors are selected and the gray out menu shows nothing !

    HELP !  why doesn't color picker select specific color ? i make secondary layer and use the tool but no colors are selected and the gray out menu shows nothing !
    what am i missing ??!!

    Please add you system info and SpeedGrade version and build number if you actually want help.

  • My "FIND' (search) Feature Grayed Out

    Suddenly, the FIND feature (under EDIT) is grayed out and not working. It was fine last night; not operational this morning. How do I fix this?
    Thanks.

    What program?

  • Photoshop CS3 - need to uninstall & reinstall but deactivation is grayed-out

    Photoshop CS3 was living happily for quite a while on my system running Windows 7 32-bit, however, lately, upon closing, it freezes, requiring a cntrl-alt-del to force quit. It has the 10.0.1 patch, the latest. A repair re-install did not fix the problem, and I am not aware that I installed anything recently with which it should conflict. I have tried the various tips & tricks on the forums related to refreshing caches, etc., but to no avail. Something's broken that I hope to fix with a clean install. Buying the latest cloud version of Photoshop is not in the budget ... I just want to get back to where I was ...
    I believe I need to do a complete uninstall of PS CS3, including manually deleting all registry entries related to CS3, Adobe, Photoshop, etc. + running cleaner utilities. While not too happy about that, I'm willing to try it. Here's the problem, I suspect that I will also need to deactivate first to prevent some issue with Adobe to later re-activate the fresh install ... the trouble is, part of what seems to be corrupted are the menu items relating to "deactivate", "activate", etc. ... they are grayed out, so I have no way to deactivate before I attempt a complete uninstall.
    A few questions;
    Is there a known issue and fix for a missing deactivation / activation menu options for PS CS3?
    Is there a way to manually preserve the activation key and remove all the other possible corrupted files and registry entries so that I can do a clean install?
    Is there another way to fix a corrupted install of PS CS3?
    Thanks in advance for any ideas!

    Yes, I had already googled and found all those 3rd party solutions before I posted my original question ... I'm not too comfortable with those, rather, I am looking for a "cleaner" solution directly from Adobe. By the way, I re-installed PS CS3 again, then ran the CC Cleaner tool BEFORE uninstalling ... it did function doing this, it removed PS CS3, but left other parts installed (Bridge CS3), I then re-installed PS CS3, but the result was no better than using the Windows uninstaller.
    The more I get into this, the more I think I may need a fresh install of my Windows 7 and all applications ... problem is, I still can't deactivate Photoshop CS3 so as to re-install it on a fresh system build ... that  is, unless the Adobe server would recognize my computer's motherboard s/n and Windows 7 key and allows automatic re-activation ... does their server go by number of current activations or does it remember particulars of each current activation so as to "refresh" the activation on a clean install to an old computer previously activated?
    Is it just me, or is this too many hoops to jump through to fix what used to be a solid piece of software? Is there some recent Windows patch identified as conflicting with CS3 software?

  • Can no longer use the gray out icon in the Menu bar to update CC

    Since I upgraded my Mac OS from 10.9.4 to 10.9.5, I only have a grayed-out icon in the Menu Bar in the Finder for checking for updates. When I try to access it, I only get an endlessly spinning wheel. Any other finding this glitch also? Any cure for it?
    I also couldn't find an app which I thought I'd used before called Adobe Updater to check for updates.

    I am having the same issue on 10.8.4

  • I got a new iPhone 5 and my itunes music will not sync properly. it will show up on the phone but it is light gray wording and they are not selected only a few songs work. The grayed out music just takes up space. Someone please help.

    My itunes music is grayed out and unplayable on my new iphone 5. only a few songs work and the rest just take up space. They will play correctly in my itunes on the computer but not the phone. Please help.

    I am so relieved to hear that I am not the only one experiencing this! However, I am sorry to hear you are going through this as well. Lucky for me I am upgrading to a 5s which will be sent to me on Wednesday. I did stumble upon an article with tips on how to downgrade back to iOS 7, but I am EXTREMELY apprehensive about doing that myself. Here's the article link if you want to give it a go:
    http://osxdaily.com/2014/09/21/downgrade-ios-8-back-to-ios-7-1-2/

  • How do I change the grayed out name underneath the iCloud sign?

    There is a grayed out name underneath the iCloud sign i iCloud preferences.
    It it not correct. Where does this name come from, and how do I change it.
    Loba49

    If you mean in Settings>iCloud>Account - and the name there is incorrect - the  whose name/ID is it? If it is not yours, how did it get in the iPad in the iCloud settings?

  • How to remove the grayed out filed

    Good Morning PS Gurus,
    With wrong company code , planning was done on one WBS. As the planning was done on that WBS, company code under assignments tab & planning element under basic data tab were grayed out.
    Is there any to remove this grayed out field.
    Many Thanks in Advance...
    Reagrds
    MM

    Delete the planing values which you have done  & than try.  This is standard behaviour.
    With Regads
    Nitin P.

  • Need a Query to find whether the database needs any media recovery...

    Hi,
    I am at the mount stage of a database and yet be opened.at this stage any Query is available or any other way is there to find whether the database needs any media recovery or Instance recovery..?
    my objective is before opening the database i need to make sure it is consistent or inconsistent and any form of recovery is needed..
    thanks &regards,
    Ragunath
    Edited by: ragu.dba.in on Mar 6, 2013 12:57 AM

    Hi Ragunath,
    Use these queries , SCN should be consistent .. no fuzzy files, check for recovery of files in v$recover_file .. pass sufficient archives & fulfill the checks before open reset-logs
    set line 900
    set pages 900
    set echo on
    alter session set nls_date_format='dd-mon-yyyy hh24:mi:ss';
    set numwidth 13
    col CHECKPOINT_CHANGE# for 9999999999999999
    col CHANGE# for 9999999999999999
    column error format a10
    column member format a60
    show parameter db_recover
    select * from v$recover_file;
    select file#, status from v$datafile;
    select file#, checkpoint_change#, checkpoint_time, error from v$datafile_header;
    select distinct status from v$backup;
    select distinct  checkpoint_change#  from v$datafile_header;
    select hxfil file_id, fhscn scn, fhthr thread, fhrba_seq sequence, fhsta status from x$kcvfh;
    select distinct fhscn from x$kcvfh;
    select hxfil file_id, fhtnm tablespace_name from x$kcvfh;
    ##### Fuzzy Check ####
    alter session set nls_date_format = 'DD-MON-YYYY HH24:MI:SS';
    set feedback on
    set heading on
    set pagesize 1000
    set linesize 175
    column checkpoint_change# format 999999999999999999999
    select status, checkpoint_change#, fuzzy,
    to_char(checkpoint_time, 'DD-MON-YYYY HH24:MI:SS') as checkpoint_time,
    count(*)
    from v$datafile_header
    group by status, checkpoint_change#, fuzzy, checkpoint_time
    order by status, checkpoint_change#, fuzzy, checkpoint_time;Thanks,
    Ajay More
    http://www.moreajays.com

  • HT4528 How can i fix the grayed out wifi bar?

    I have done everything from restarting my phone to restoring it. I just want my wifi.

    http://support.apple.com/kb/TS1559 for Grayed out or dim wifi.

  • How can i take out the print out of invoices

    i want to see the print preview of billing document and i want to take the  print out also
    but i m unable to do this
    so wat is the navigation to do this please suggest.
    regards
    subrat

    Output of Invoice:
    Billing document (Change Mode) : VF02 --> Enter (takes to main screen) --> on the top line Goto --> Header --> Output  --> maintain output type --> Enter --> back --> Enter printer (in most cases LOCL) --> Enter & SAVE.
    Move out of billing document & revisit Billing Document in change mode(VF02) --> In the initial screen itself, on the top line o to Billing Document --> Output --> Screen / preview > Enter> a screen will pop-up on which printer name is mentioned --> Enter & you will get the preview of Invoice.
    To Configure printer, take assistance from basis consultant.
    Regards,
    Rajesh Banka

  • Poweshell script for adding the computer object in to SCOM 2012 group.

    Hi Team,
    Is there any way to add the computer object ( csv file) to SCOM 2012 manually created  group.

    Hi,
    In addition, hope the links below be helpful for you:
    Creating and Updating Groups
    http://blogs.msdn.com/b/jakuboleksy/archive/2006/11/15/creating-and-updating-groups.aspx
    Programmatically Creating Groups
    http://blogs.technet.com/b/brianwren/archive/2008/11/18/programmatically-creating-groups.aspx
    Modifying Explicit Group Membership in SCOM 2012 with PowerShell
    http://blogs.msdn.com/b/rslaten/archive/2013/06/27/modifying-explicit-group-membership-in-scom-2012-with-powershell.aspx
    Regards,
    Yan Li
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • Need advice on how to get the most out of iDVD.

    My wife and I do wedding Photography - Videography as a source of extra income.
    My question is: How can I produce the highest image quality dvd for our clients using iDVD.
    I dont quite under stand the difference between exporting from iMovie to iDVD and Sharing the
    movie from iMovie to the media browser, then opening iDVD and adding the movie that way.
    I shoot the movies with my Sony HDR-SR12 Camera and edit the footage with iMovie 09'.
    "please explain slowly and clearly" I am good with what I already know, however can quickly get
    confused when taking on new methods and or terminology...
    Thanks in advance.

    My question is: How can I produce the highest image quality dvd for our clients using iDVD.
    "please explain slowly and clearly"
    If only it WERE simple.....
    Your camera shoots HD video in AVCHD format. DVDs use mpg-2 compression and are really 4:3 devices; 16:9 content is anamorphically squeezed to the SD format. DVD players unsqueeze it on playback.
    Converting you HD AVCHD video to anamorphically squeezed mpg-2 content offers lots of opportunities for quality loss.
    You can try simply 'Sharing' your iMovie '09 movie with iDVD but I expect this will not produce maximum quality.
    I probably would choose the Share>Export using QuickTime option and then select the QuickTime Option>Video Setting of Apple Intermediate Codec. This conversion may take quite a while.
    For single layer media, if your content is under 60 minutes Best Performance encoding will probably give you the best results; if it's over 60 and under 120 minutes use Professional Quality. Personally, I try to stay away from DL media.
    What I suggest you do is create a short (say 15 minute) demo video clip and then try the various output option from iMovie and encoding options in iDVD to see what you like.
    When the iApps first came out (about 8 years ago), most prosumer video shooting was done in the DV format (digital video on mini-tape cassettes). DV is an easy format to edit because it is 'lightly' compressed and all the information needed to edit is easily accessible. The newer formats (like your AVCHD) are much more highly compressed and are more complicated to work with.

  • My workspace turned white and I need to change it back to the gray that it usually is

    How do i change my workspace that has turned white back to gray?

    In most versions of PSE when you right click on the work area it is possible to reset to default, as well as other colors. Hope that it work for you.

Maybe you are looking for