You are browsing the archive for Operations Manager 2012.

Avatar of alkin

by alkin

Part 2: Add Locations to OpsMgr Agents with PowerShell

1:50 pm in Powershell, SytemCenter, Uncategorized by alkin

In my previous post I explained how to do a bulk import of locations.

Now that we have all the locations we want into OpsMgr we can associate agent-managed computers, management servers, or resource pools with a location using teh set-scomlocation CMDLET.

The Set-SCOMLocation cmdlet associates one or more agent-managed computers, management servers, or resource pools with a location. This cmdlet removes a current association, if one exists. The Web Application Availability Monitoring Summary Map Dashboard displays state information for agents, management servers, and resource pools associated with a location. You can remove an association by using the Remove-SCOMLocation cmdlet.

The following script will add location coordinates to a list of servers retrieved from a CSV file. You can download the CSV file here.

# //***************************************************************************
# // ***** Script Header *****
# //
# // Solution:
# // File:      AddlocationstoAgents.ps1
# // Author:    Alexandre Verkinderen
# // Purpose:   Add locations to Agents from Excel
# //
# //
# // ***** End Header *****
# //***************************************************************************
# //----------------------------------------------------------------------------
#//  Global constant and variable declarations

$list = Import-Csv -Path "C:\temp\Servers.csv"

$MS = "MOM4"

Import-Module OperationsManager
#Connect to OpsMgr Management GroupStart-OperationsManagerClientShell -ManagementServerName: $MS -PersistConnection: $true -Interactive: $true

#//  Main routines

#Get all agents
$computers = get-scomagent

#Get all Locations
$Locations = Get-scomlocation

foreach ($entry in $list)

$name = $entry.Server
$Loc = $entry.Location

#Filter agents by name
$agent = $computers | where { $_.displayname -like "*$name*" }

#Filter agents by Location
$location = $Locations | where { $_.displayname -like "*$Loc*" }

#Set location
Set-SCOMLocation –Location $Location –Agent $agent

write-host server $name is in $loc


Hope this helps.

Alexandre Verkinderen

Avatar of alkin

by alkin

Using System Center Advisor Management Packs in OpsMgr

6:59 am in Uncategorized by alkin

System Center Advisor has some extra management packs that are not available for OpsMgr.

The full list of data points collected by the agent is available for download here, from the Microsoft Download Center, in an Excel spreadsheet.  For example, included in this list are properties about SQL Server like data from SERVERPROPERTY, sys.databases, and sys.configurations.

I think it’s a shame we don’t have those extra rules and monitors in the OpsMgr MP’s so I wanted to have those extra checks in my OpsMgr environment by importing the Advisor management packs! Let’s see if this will work!

You can find all Advisor management packs on the gateway in C:\Program Files\System Center Advisor\GatewayData\Content



Just copy those Advisor MP’s to your Opsmgr box and import them:


Once imported you will all those extra checks in your OpsMgr environment.


And alerts are starting coming in that you didn’t get before:



Alexandre Verkinderen

Avatar of alkin

by alkin

The OpsMgr Unleashed authors on Operations Manager 2012

12:32 pm in Uncategorized by alkin

Talk TechNet is about discussing topics and trends in the world of IT Professionals.  In our May 6th show we’ll have guests Kerrie Meyler , Cameron Fuller, and John Joyner. Kerrie, Cameron, and John are Operations Manager MVPs and authors of the System Center Operations Manager Unleashed series, and will be discussing System Center Operations Manager 2012. Call in and join us for what promises to be a lively 60 minute session. 

More information can be found here

Visit Us On TwitterVisit Us On Linkedin