How can I find what scom group a specific server belongs to using powershell?

Environment:  SCOM 2007 r2
Server in question:  Running Windows 2003 Std. (yes I know this sounds crazy)
Why do I need this:  I noticed at the console level we have had server unexpected shutdown events which are not generating email notifications. 
Source shows: Windows 2003 Server Standard Edition
Alert Rule:  Windows Shutdown Unexpectedly
From what I see these are all windows 2003 server Std edition systems.  I did a track and trace using our exchange tracking system which confirmed the alerts were not being emailed. Not sure if there is a better approach for this, but not being a sql
expert (however I do have someone I can leverage) I am trying to see if I can somehow extract this information using powershell.
Secondary general question:  How can I find out the current size of our scom 2007 database and the number of objkects\servers being monitored? This is prep work for a migration over to 2012.
Thanks in advance for the help!

1. what scom group a specific server belongs to
function Get-GroupNames {
 [cmdletbinding()]
 param($computerFQDN)
 $containmentRel = Get-RelationshipClass -name:’Microsoft.SystemCenter.InstanceGroupContainsEntities’
$computerClass = Get-MonitoringClass -name:”Microsoft.Windows.Computer”
$criteria = [string]::Format(“PrincipalName = ‘{0}’”,$computerFQDN)
 try {
 $computer = Get-MonitoringObject -monitoringClass:$computerClass -criteria:$criteria
 $relatedObjects = $computer.GetMonitoringRelationshipObjectsWhereTarget($containmentRel,[Microsoft.EnterpriseManagement.Configuration.DerivedClassTraversalDepth]::Recursive,[Microsoft.EnterpriseManagement.Common.TraversalDepth]::Recursive)
 catch {
 $_
 write-host “An error occurred while querying groups of $computerFQDN”
foreach($group in $relatedObjects)
 [array]$Groups = $groups + $group.SourceMonitoringObject.DisplayName
 if($groups) {
 return $groups
 } else {
 write-host “No groups available for $computerFQDN”
Usage:
 Get-GroupName -ComputerFQDN myserver1
for detail, pls. refer to
http://techibee.com/powershell/powershell-get-scom-groups-of-a-computer-account/1129
Roger

Similar Messages

  • How can I find what apple ID I used to register my iMac when I first booted up? I am being told that by using this ID I will be able to go on to the App store and down load iPhoto at no cost. Is this true? My iMac does not have iPhoto resident on it now

    How can I find what apple ID I used to register my iMac when I first booted up? I am being told that by using this ID I will be able to go on to the App store and down load iPhoto at no cost. Is this true? My iMac does not have iPhoto resident on it now and I only purchased my new iMac in December 2012
    Thanks....

    Launch Keychain Access and click on Login in the left hand pane and then on Passwords.  Next do search for Apple in the search field at the top and click on Apple ID Authenicication in the list that comes up.  That will give you the ID no. and password.
    OT

  • HT5622 how can I find what the charges aree to my credit card from the apple store? I get multiple charges every month and don't know what they are for...I want to cancel whatever is being charged to me...how do I do it?

    how can I find what the charges aree to my credit card from the apple store? I get multiple charges every month and don't know what they are for...I want to cancel whatever is being charged to me...how do I do it?

    Have a look at this link
    http://support.apple.com/kb/ht2727

  • HT4910 how can i find what devices are sync to my laptop as mine is saying 5 i dont no why

    how can i find what devies are synced with my computer as in itunes says 5 i dont have 5

    That information is not available.
    De-authorizing Computers (contributed by user John Galt)
    You can de-authorize individual computers, but only by using those computers. The only other option is to "de-authorize all" from your iTunes account.
      1. Open iTunes on a computer
      2. From the Store menu, select "View my Account..."
      3. Sign in with your Apple ID and password.
      4. Under "Computer Authorizations" select "De-authorize All".
      5. Authorize each computer you still have, as you may require.
    You may only do this once per year.
    After you "de-authorize all" your authorized computers, re-authorize each one as required.
    If you have de-authorized all computers and need to do it again, but your year has not elapsed, then contact: Apple - Support - iTunes - Contact Us.
    For more information on authorization and de-authorization: iTunes Store- Authorize or deauthorize your Mac or PC.

  • I forgot my Security Question and Security Info email. How can I reset my Secret Question or how can I find what was my Security Info email is?

    I forgot my Security Question and Security Info email. How can I reset my Secret Question or how can I find what was my Security Info email is?

    You won't be able to view and/or change your rescue email address until you can answer your security question(s). If you only have one security question then you should be able to reset it according to http://support.apple.com/kb/HT6170 :
    Reset your security questions
    Go to My Apple ID (appleid.apple.com).
    Select “Manage your Apple ID” and sign in.
    Select “Password and Security” on the left side of the page.
    If you have only one security question, you can change the question and answer now.
    If you have more than one security question:
    Select “Send reset security info email to [your rescue email address].” If you don't see this link or don't have access to your rescue address, contact Apple Support as described in the next section.
    Your rescue address will receive a reset email from Apple. Follow its instructions to reset your security questions and set up new questions and answers. Didn't receive the email ?
    After resetting your security questions, consider turning on two-step verification. With two-step verification, you don't need security questions to secure your account or verify your identity.
    If you have more than one question then as you can't remember your rescue email address then you will need to contact Support in your country to get the questions reset.
    Contacting Apple about account security : http://support.apple.com/kb/HT5699
    When they've been reset you can then use the steps on this page to view and/or change your rescue email address for potential future use : http://support.apple.com/kb/HT5620
    Or if it's available in your country you could change to 2-step verification : http://support.apple.com/kb/HT5570

  • How can I find out the screen size of the users moniter using the Acrobat SDK?

    How can I find out the screen size of the users moniter using the Acrobat SDK? I need to know how much sreen real estate that is available on the users moniter. Is there some call that I can make from the SDK to discover the maximun X and Y coordinates?
    Thanks,
    Gregory

    Currently, I am testing on multiple moniters and it is defaulting to the moniter designated as the #1 moniter. For our purposes, this is acceptable. Once the two documents have loaded, the user can move and re-size at will.
    Gregory

  • How can I find the index from a specific container?

    How can I find the index from a specific container?
    For example, if I'm traversing through textframes like so (an example, not tested):
    var doc = app.activeDocument;
    var story = doc.pages[0].textFrames[0].parentStory;
    for (var i=0, l=story.textContainers.length; i<l; i++) {
         var textFrame = story.textContainers[i];
         if (textFrame.constructor.name == "TextFrame") {
              var lastPara = textFrame.paragraphs.lastItem();        //How can I find the index of this in relation to the story?
    How can I find the index of "lastPara" in relation to the story rather than the current container?
    I tried:
    var newPara = story.paragraphs[lastPara.index];
    but this results in an invalid object. . .
    alert(newPara.isValid);      //returns false

    The .index property is the character offset. So lastPara will begin at story.characters[lastPara.index].

  • How can we find all the available  user-exits in sap without using SMOD?.

    How can we find all the available  user-exits in sap without using SMOD?.

    Hi,
    Please check this links for user exits list.
    http://www.planetsap.com/Userexit_List.htm
    http://www.easymarketplace.de/userexit.php
    http://www.sap-img.com/ab038.htm
    Regards,
    Ferry Lianto

  • How can I find what time a tab was opened in Safari?

    How can I find out what time a tab was opened in Safari?

    As of Safari 5.1.7 there does not appear to be a way to view the time in the browser, but it is still possbile to find from the raw history file. Open /Users/[yourusername]/library/Safari/History.plist in a text editor. Depending on how your text editor reads the file, you may see a lot of garbled text, but you should still be able to find the URL that you want the time for. After the URL you may see the page's title, but should also see a left square bracket followed by numbers.
    Example:
    _?http://www.apple.com/_Apple[377832904.6o
    The integer is an Apple timestamp (number of seconds since 00:00:00 UTC on 1 January 2001). Find a timestamp calculator online to get the actual time for your timestamp. In the example above, Apple was visited on Dec 21 2012 at 17:35:04 PST.
    Cheers.

  • How can I find what's really in my Library?

    After several problematic days, I finally installed iTunes 9.
    The new version then imported multiple files (so fast I hardly saw what half of them were, but they were additional to all my regular/ previous files - things like voice memos and other stuff).
    I notice that my memory usage has gone up considerably (even though I cannot see a lot of those new imported files in iTunes anywhere).
    Question: how can I find (and get rid of) what those imported files were please? On my c: drive folder I can see the iTunes folder with album artwork, games, music, applications, previous libraries - but I think there is much more stuff hidden around somewhere - any ideas please?

    What you see in your +My Music\iTunes+ folder is pretty much everything that takes up space. Be careful changing the files here, though. ITunes will not notice if you move or delete something, so the entry that points to it in iTunes will get a "!" mark. Better to review your libraries in iTunes and delete stuff you don't want, opting to move them to the Recycle Bin.
    The only other place iTunes stores anything (except for its own .exe stuff in +Program Files+, of course) is in the hidden system folder Application Data. In your Windows XP, you can view this folder by opening a Run box ( +Start > Run+ ) and typing %appdata%.

  • HT1925 how can i find what gb is my phone

    how can i tell what gb my iphone is & how big is my camera

    Please be aware that you are not communicating with Apple when you post in these forums. The only people who will reply to your posts are we your fellow users, and none of us get paid to help here, so it may take a while before someone replies. It also helps if you post in the correct forum; this is the QuickTime forum, not the iPhone forum.
    Regards.

  • How can i find total no of files in a directory ..using fileconnection

    how can i find total no of files in a directory.
    currently iam using
    Enumeration enum = fileconn.list(); and by iterating iam getting count.
    but the application is getting stuckup when the number of files in the directory is large.
    Is there any alternative. please help.
    thanks in advance.

    HI,
    this is a simple example with a cursor over user_tables view:
    set serveroutput on
    DECLARE
       CURSOR c_test IS
          SELECT table_name FROM user_tables;
       type t_reg is table of varchar2(30);
       l_reg t_reg;
    BEGIN
       OPEN c_test;
       fetch c_test bulk collect into l_reg;
       dbms_output.put_line(c_test%ROWCOUNT);
    END;
    /Output:
    SQL>
    SQL> set serveroutput on
    SQL> DECLARE
      2     CURSOR c_test IS
      3        SELECT table_name FROM user_tables;
      4     type t_reg is table of varchar2(30);
      5     l_reg t_reg;
      6  BEGIN
      7     OPEN c_test;
      8 
      9     fetch c_test bulk collect into l_reg;
    10 
    11     dbms_output.put_line(c_test%ROWCOUNT);
    12  END;
    13  /
    42
    PL/SQL procedure successfully completed
    SQL> Regards,
    Edited by: Walter Fernández on Nov 29, 2008 8:59 AM - Adding output...

  • How can I find what Event a photo is in when that photo is found via Faces?

    I've stumbled upon a photo via the Faces category. I do not know what Event this photo exists in, but I'd like to know (this same issue can occur with a photo found via Places of course too). How do I find out what Event this photo exists in? Of course I can pull the date or title data from the photo and then search for that data and visually find the photo from the search results, but I would assume there would be a much much easier method.
    None of the information data seems to contain any event data. I would think each photo would contain information as to what Event it currently resides in.

    Wait until iPhoto is done scanning for new images in the ".. might also be in the photos below" section, then right click (or Option-Click if your mouse has no right button) on the image, and in the last group of the menu that pops up should be an item "Show Event". While it's still scanning for more faces, the "Show Event" menu item isn't shown yet.
    Message was edited by: tilman

  • How can I know what objects are under specific tablesapce?

    Dear all,
    I want to find out how many tables are under "SYSAPPL" tablespace. How can I know that?
    Please advice,
    Amy

    Assuming you have appropriate privileges,
    SELECT COUNT(*)
      FROM dba_tables
    WHERE tablespace_name = 'SYSAPPL'If you don't have access to DBA_TABLES, you may be able to use USER_TABLES or ALL_TABLES, but that may miss objects that are in that tablespace that you don't have access to.
    Justin

  • How can I find a bookmark in a specific folder?

    In older version, I can search for a bookmark in a specific folders in Library. After typing the words, search results are listed and I can choose something like "All bookmarks","History" or a particular folder. Does this function still exist?

    hello lucaly, you might want to install the following addon in order to get this functionality back: https://addons.mozilla.org/firefox/addon/savedsearchbutton/

Maybe you are looking for

  • How can i hide my email account on iphone 4 or how can i lock it with password

    i have already locked my home screen but i want to lock my email box too, so nobody can read my emails, is there any way to lock just email account

  • Problem with OAException Warning Dialog

    We have developed a custon page for AME. The page has 3 tabs with each tab page having search option. The results of the search are displayed in an advanced table. We have provided Delete functionality also. The delete is working fine for 1st 10 reco

  • Do I need special chracteristics for this?

    Hello, I am working on a project and the requirements demand three reports, with following columns: 1) Previous Month, Month 1, Month 2, ..., Month 6, First 6 Months Total 2) Previous Quarter, Quarter 1, Quarter 2, ..., Quarter 6, Tot First 2 Quarter

  • How to remove all pictures of iPod Touch

    How to remove all the pictures from my iPod Touch 32GB.All the solutions ive tried off the net have failed.

  • Backing Up a purchase - Aperture

    I have heard n these for a that Apple apps like Aperture are not readily restored from backups of the (say) Aperture.app file. Instead, a re-install is recommended. Is there a way to get a dmg file for my purchase, such that I can re-install it, even