Welcome to MSDN Blogs Sign in | Join | Help

Browse by Tags

All Tags » Command Shell   (RSS)
Sorry, but there are no more tags available to filter with.

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

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
Posted by Boris Yanushpolsky | 9 Comments
Filed under:

Attachment(s): GroupMM.zip

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,
Posted by Boris Yanushpolsky | 7 Comments
Filed under:

Attachment(s): ProxyingDisabledAlert.jpg

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

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
Posted by Boris Yanushpolsky | 1 Comments
Filed under:

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
Posted by Boris Yanushpolsky | 6 Comments
Filed under:

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

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
Posted by Boris Yanushpolsky | 7 Comments
Filed under:

Attachment(s): GetContainingGroups.zip

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
Posted by Boris Yanushpolsky | 15 Comments
Filed under:

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,

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
Posted by Boris Yanushpolsky | 6 Comments
Filed under:

Attachment(s): DumpMPContents.zip

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
Posted by Boris Yanushpolsky | 3 Comments
Filed under:

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.
Posted by Boris Yanushpolsky | 4 Comments
Filed under:

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
Posted by Boris Yanushpolsky | 7 Comments
Filed under:

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
Posted by Boris Yanushpolsky | 10 Comments
Filed under:

Attachment(s): MpToXml.zip
More Posts Next page »
 
Page view tracker