Browse by Tags

Tagged Content List
  • Blog Post: Automating port monitoring using PowerShell

    A while I wrote a blog entry about how you can automate the creation of URL monitoring logic in OpsMgr using PowerShell. One of the questions I have received is "how do you do the same thing for port monitoring ?". Attached is a script that demonstrates how this can be done. In order to run the script...
  • Blog Post: One more maintenance mode script

    Attached is a script that takes a group and puts all the computers in the group (as well as the health service and the healthservice watcher) into maintenance mode. Here is how you can run the script from the command line to start or stop maintenance mode (without launching powershell.exe) One...
  • Blog Post: Troubleshooting event id 33333 logged by the DataAccessLayer

    Sometimes after installing an agent or importing a management pack you may see event number 33333 logged by the Data Access layer. In many situations this error is caused by the fact that proxying is not enabled for a particular agent. In OpsMgr SP1, we have added a new rule to pickup this event and...
  • Blog Post: Enumerating Windows Event log manual reset monitors

    Couple of days ago I saw a question about how can one find out the list of manual reset event log monitors in a management group. Given that this is a little bit tricky I decided to post a sample so that others could see how to do it as well. Attached is a powershell script that will dump a list of Windows...
  • Blog Post: Retrieving rules and monitors targeted to a particular class (target)

    This question came up several times in various forums so I wanted to post a sample script that shows how you can retrieve the list of both rules and monitors targeted to a particular class (target): $mc = get-monitoringclass | where {$_.DisplayName -eq 'Windows Server 2003 Logical Disk'} $rules...
  • Blog Post: OpsMgr SP1 - Removing instances for which discovery is disabled

    One of the issues that we saw in OpsMgr RTM is that if you disabled a discovery using an override let say a particular SQL DB, the instance created by this discovery would not be removed. In SP1 we have added a new cmdlet to force the removal of instances for which discovery is disabled using an override...
  • Blog Post: What's in my groups?

    Here is a script I put together that demonstrates how to retrieve all the groups and then retreive the contents of each group as well as the types of objects contained in the group. In order to run the script you will need to do the following: 1 - Save the script 2 - Open the OpsMgr command...
  • Blog Post: Which groups is a particular computer member of?

    Given that groups are used for role based security, overrides, reports, and some other features, it might be pretty interesting to know what groups is a particular computer member of. Attached is a sample script that dumps the list of groups that a particular computer is a member of. Steps to run...
  • Blog Post: What if I dont want to put the whole computer into maintenance mode?

    Sometimes you may not wish to put the whole computer into maintenance mode. Instead you may wish to put just a number of databases or websites into maintenance mode. The steps are very simple: 1 - Get the monitoring class that represents the type of monitoring objects that you wish to put into...
  • Blog Post: Specifying a run as account for a run as profile

    Here is a sample script that demonstrates how to specify which RunAs account to use for a particular RunAs profile on a particular agent. The main reason I am blogging about this is that the code that needs to be written to do this is not straight forward, and one day you may need to automate this. ...
  • Blog Post: What's in my management pack?

    Here is a simple script that I wrote for someone today to dump the contents of a management pack that include views, rules, monitors, tasks, console tasks. I figured others might find it useful as well. In order to run the script, open up the OpsMgr command shell and run the following command: ...
  • Blog Post: Disabled discoveries

    Some discoveries in the management packs that ship with OpsMgr are disabled out of the box. One of the reasons is that not everyone might be interested in monitoring certain components. The easiest way to prevent a particular component from being monitored is disable the discovery for it. If OpsMgr cant...
  • Blog Post: Setting specific failover management servers

    Unless you are using AD integration, when the agent cannot communicate with its primary management server, it can pick up any management server to failover to. The only way in the console to provide a specific list of failover servers is it use AD integration. If you are not using AD integration but...
  • Blog Post: Stopping maintenance mode

    I wrote a blog post several weeks ago about putting a computer into maintenance mode using PowerShell. For some reason after posting the script there was a white space infront of one of the parameters which resulted in the health service watcher object not being put into maintenance mode. I just fixed...
  • Blog Post: Converting a sealed management pack to readable XML

    Ever wanted to dig into a management pack but could not because it is sealed? One workaround is to import the management pack into a management group and then export it. There is a much quicker way to do this using PowerShell and the SDK. Attached is a small script that will do the trick. The prerequisite...
  • Blog Post: Add/Remove users to a user role

    Currently there is no cmdlet to add a user to a user role, however its very easy to do using a combination of the Get-UserRole cmdlet and a bit of the SDK. $operatorsUserRole = Get-UserRole | where {$_.DisplayName -eq "Operations Manager Operators"} $operatorsUserRole.Users.Add("contoso\AdOperators...
  • Blog Post: Automating the setup of URL monitoring

    One of the new things in OpsMgr is the ability to easily setup URL monitoring from multiple watcher nodes. What what if you want to monitor 500 different URLs? Setting this up manually could be pretty time consuming. Here is a script I put together that demonstrates how to automate this process using...
  • Blog Post: Listing all the performance collection rules in a management group

    Performance monitors will look at at performance counter value and change state when a particular condition is detected. However if you want to collect performance counters for viewing in the console or reporting, you need to create a performance collection rule. Here is sample script I put together...
  • Blog Post: So what thresholds do my monitors have?

    One of the things people have been asking about is what thresholds are used by various monitors. There is no bullet proof way to do this, but here is a script I wrote that would answer this question for the majority of monitors: function GetThreshold ([String] $configuration) { $config = [xml...
  • Blog Post: So what about diagnostics and recoveries?

    Another new capability in OpsMgr is being able to execute diagnostics and recoveries as reactions to monitor state changes. The OpsMgr MP defines a number of diagnostics to keep the agents healthy and repair them if need be. Here is a powershell script that will shed some light on what diagnostics and...
  • Blog Post: So what is in maintenance mode?

    In MOM 2005 you could put computers into maintenance mode; in OpsMgr 2007 maintenance mode is much more granular. Instead of putting the whole computer into maintenance mode, you can put a particular database or NT service into maintenance mode. At times it can be challenging to figure out what do you...
  • Blog Post: Putting a computer into maintenance mode

    Putting a computer into maintenance mode is what users do when they know a particular computer will be offline for a while (security update, known network issues, hardware installation, other things). This is done so that OpsMgr does not generate any alerts about this computer. The interesting part is...
Page 1 of 1 (22 items)