What Rules My Class?

There have been a few questions regarding how to enumerate the rules targeting a class. Here is a script you can save as a file. I named the script get-rulesforclass.ps1 param ([String] $className) $class = get-monitoringclass | where {$_.Name -eq $className} if ($class -eq $null){ throw “Class ‘$className’ not found.”;} if ($class -is [Array]){ throw “More than…

0

Where Are My Properties?

I consistently get asked how to display class specific properties. The solution is simple but not very obvious. get-monitoringobject … | format-list *  You are probably wondering why you even need to do this. You are not alone:)  Each MonitoringObject can be an instance of multiple classes so there is no limit on the number of enumerable properties…

1

Deleting Agents

A few of you sent mail asking how to delete an agent using the Command Shell. There is a Cmdlet for uninstalling an agent called Uninstall-Agent. However, uninstalling an agent will not work if the computer the agent is hosted by is not available. To help address the issue I created a function to automate the process. Keep in mind this function…

6

Command Shell Introduction Video

Right before MMS 2007 I finished a video to help introduce folks to the Command Shell. Here’s a link.                        http://www.microsoft.com/winme/0703/28666/Command_Shell_Intro_Edited.asx Let me know if you want more videos.  As always post your questions and comments. Roger Sprague

2

Discovering Windows Computers

  Much like the Operations Manager UI Console the Command Shell offers several ways to discover Windows computers. You can either search by computer name or search by LDAP query. Let start by looking at the diferences between each approach.   The following command defines a LDAP query and passes it to the New-WindowsDiscoveryConfiguration Cmdlet thereby…

4

Running Tasks

You can run a task from the Command Shell much like you would from the UI Console. You start by selecting the object you want to work with then you select the task you want to run. In this scenario we are going to look at resetting the Health Service store of a hypothetical agent named…

0

MCF Over Tiering

If you are not familiar with MCF in MOM 2005 you can read more about it here. I do not go into detail about MCF here as that is an area best covered by Jakub. What I do want to show you is how to setup MCF over tiering using the Operations Manager Command Shell. I encourage you…

0

This tier is your tier…

If you happen to have multiple management groups and you need a way of seeing alerts aggregated across all of your Management Groups or you need a way of managing one Management Group via another (proxy) Management Group then tierring is just the ticket. The Operations Manager Command Shell provides explicit support for creating tiers and…

1

One Provider to Rule Them All!

Along with a healthy dose of Cmdlets, the Operations Manager snapin (aka “Command Shell”) includes a PowerShell Provider that allows you to manage one or more Management Groups at the same time.  To start, create a connection to each Management Group you want to manage. For example… # Connect directly to a Management Group New-ManagementGroupConnection mg1.redmond.corp.microsoft.com or…

3

Have your PowerShell and our Cmdlets too…

Adding the Operations Manager Snapin As you may already know, the PowerShell is an extensible environment, as such we have tried to create a useful starting point for you by loading the Operations Manager Cmdlets and functions within a PowerShell environment named “Command Shell”. For those of you who need to customize the PowerShell experience…

2