| Walter's profileSystem Center Operations...PhotosBlogLists | Help |
System Center Operations Manager 2007 |
|||||
|
|
September 22 I'm Back! http://blogs.technet.com/wchomak/I will be keeping this site alive, but just at a different location, http://blogs.technet.com/wchomak/ Sorry for the premature announcement. Please ping me with any questions.
September 17 Microsoft Opportunity - OpsMgr/MOM Premier Field Engineer (Irvine, CA)I am posting this on behalf of a colleague. Feel free to forward to anyone you think may be interested.
“Microsoft currently has an OpsMgr/MOM opening based out of the Irvine, CA office. Please follow this link for a detailed job description; if you like what you see, go ahead and apply while you’re there by clicking on ‘submit resume’. If you know someone who might be interested, please forward this information their way. If you have any questions or if you would like more information, please contact me directly v-kelams@microsoft.com”
September 16 Thanks for The Good Times & SupportAs of today this site has had 251,049 visitors since September 2007. Thank you. You may have noticed a major slow down in content. I have moved on to jump-start some internal efforts at Microsoft for the dissemination of “field-ready” OpsMgr information. As a result, I have simply run out of time. The site will remain on-line and I hope to re-invent sometime soon.
Walter Chomak Senior Consultant Microsoft Consulting Services East Region Technology Team| Management and Operations m 781-974-4188 f ax 617-249-1701
Please Visit: System Center Operations Manager 2007
September 10 Get SP Info from AD
http://ianblythmanagement.wordpress.com/2008/09/10/get-sp-info-from-ad/ | Comments
One of the things that is required when you roll out agents is to know that the minimum service pack has been installed. Of course you can find out by trying to deploy the agent. The install failing will tell you but that is not a great strategy. If the customer is really good then they can provide that information but quite often I have to find it out. Or they ask me! There are some ADSI scripts that I looked at in the Script Center which helped but did not give quite what I wanted plus I knew that PowerShell has a nice export to CSV option so pulling it into Excel would be a breeze. I started
with PowerGui as it is an easier way to find out the command line but to use
the AD extensions you need to download and install Quest Active Roles
(available in 32 and 64 bit). I hoped that I could get all the computers that were servers in PowerGui and output that to a text file. And I did get part of the way there but it seemed to choke getting all the computer information for the number of servers. But as it has a tab to show the PowerShell command I was able to take those and build on it. I did this on the RMS as it had PowerShell installed (no need to run this on a DC) and I used the normal PowerShell console rather than the OpsMgr one. You need to tell it to use the Quest Add-in. Add-PSSnapin Quest.ActiveRoles.ADManagement Then using the command that PowerGui built I found all servers that were servers and had no SP (useful if all servers are 2003). Get-QADComputer -ErrorAction SilentlyContinue -SizeLimit 0 | where { $_.OSName -like ‘*Server*’ } | where { $_.OSServicePack -eq $null } | Select-Object -property “Name”,”Type”,”DN” Instead of displaying the list I wanted it as a CSV file. Get-QADComputer -ErrorAction SilentlyContinue -SizeLimit 0 | where { $_.OSName -like ‘*Server*’ } | where { $_.OSServicePack -eq $null } | export-csv c:\servers_nosp.csv Now for all servers Get-QADComputer -ErrorAction SilentlyContinue -SizeLimit 0 | where { $_.OSName -like ‘*Server*’ } | export-csv c:\servers.csv There was too much information in the CSV although you can delete the columns. A quick look at the PDF for Active Roles and I found the fields that I wanted. The next line does all computers so if you need to do SCCM as well this is useful. Get-QADComputer -ErrorAction SilentlyContinue -SizeLimit 0 | Select-Object -property “Name”,”OSName”,”OSVersion”,”OSServicePack”,”DN”} | export-csv c:\allcomputers.csv I imported that into Excel and with a quick pivot table I had all the information I needed and as I included the Distinguished Name I could see which OUs these servers were in. Note that this just provides the information from a single domain. Now someone will tell me why didn’t I use x, y or z as they have been around for ages to do this. Well I either didn’t know or couldn’t find them and I wanted to extend my PowerShell knowledge. September 09 Tip: Four ways to target notifications to a more granular level OpsMgr and Essentials 2007http://www.systemcenterforum.org/tip-four-ways-to-target-notifications-to-a-more-granular-level-opsmgr-and-essentials-2007/ | Comments Targeting notifications to at a granular level in Operations Manager and Essentials 2007 can be challenging, especially when you must filter down to a single rule or monitor. Doing this through the console GUI is seldom intuitive (especially for less experienced users), and sometimes not possible at all. I wanted to discuss four different methods you can use to refine your notification targeting to the most granular level possible in a variety of situations. 1. Powershell - Using the Future Occurrences of an Alert Powershell script Brian McDermott put together, you can use a task that launches a Powershell script to create a new Notification Subscription that targets all future occurrences of the alert you specify. This solution requires some advance configuration. Be sure to follow the configuration instructions in Brians blog post carefully. And of course it also requires that you generate at least one occurrence of an alert if you want to use the Powershell task to create the subscription. 2. Combinations of Resolution State, Group and Class - As you will see, there’s a lot of flexibility in this method, although it takes some work. As Jeremy Pavleck mentions, you have 254 possible resolution states that can be used to in a Notification Subscription to target a notification subscription. However, you cannot set a custom resolution state in the UI, so running a Powershell script on a timed basis using a rule or scheduled task can be used to set the resolution state to the desired value and thus, trigger a notification subscription. See Jeremy’s walkthrough on how to make this happen. http://pavleck.net/2008/07/03/using-resolution-states-to-fine-tune-alert-notifications/ As mentioned by one of Jeremy’s readers, you can also tweak the Powershell to only flip the resolution states for alerts containing a particular keyword. Kicking it up another notch! Let’s take this even one step further. We can leverage the filtering options in notification subscriptions in Operations Manager and Essentials 2007 to stretch this even further. Since we can define a more granular notification subscription using groups and classes, as well as resolution states, we can specify object classes and groups as filtering options as well. This can essentially allow us to use a resolution state multiple times, thus extending Jeremy’s solution exponentially further than the 254 available resolution states. WARNING: Be careful not to run too many Powershell instances too often. You’re imposing load on the Root Management Server with every run, so you want to be sensitive to that. And if you have a large number of alerts, it can take a few seconds to run. NOTE: This option is not so easy in Essentials 2007, as there is no Command Shell. However, it is not completely impossible, as you can use Powershell in Essentials to attach to the management group through the SDK. See our article on a Command Shell for Essentials 2007 at the URL below. http://www.systemcenterforum.org/sce-2007-command-shell/ 3. Using Distributed Applications and / or MP Templates - Every set of monitors created with one of the available management pack templates creates a new object class that can be targeted for notification. The same is true of a distributed application. You’ll see an object class for every distributed application you create. Long story short. If you can establish the monitors you need using either of the above, you can easily target your notification to the class created as a result. 4. Create a Custom Object Class - Using the Create Attribute Wizard, you can create a registry or WMI-based object discovery for your own custom object class, specializing the existing class of your choice. So, if you needed to target a notification to a particular event or condition even on a single server, we could use a registry-based discovery to target a characteristic unique to that machine, be it a Windows service (in HKLM\System\CurrentControlSet\Services) or even the server name, which is also stored in the registry. Just as in the previous example, the object class is then available for filtering the notification to rules and monitors targeting the class you create. I’ll stop here, but hopefully these have given you some fresh ideas for targeting notifications in your environment. |
||||
|
|