You are browsing the archive for opsmgr.

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

Part 1: Bulk import server locations with PowerShell

2:47 pm in Powershell, SytemCenter, Uncategorized by alkin

For a recent project I had to specify the longitude and latitude for all my  servers (about a 1000)  to be able to show them on a map.

In OpsMgr 2012 you can now use the the following new PowerShell CMDlets:

  1. The New-SCOMLocation cmdlet creates a location. You can associate agent-managed computers, management servers, or resource pools with a location by using the Set-SCOMLocation cmdlet. The Web Application Availability Monitoring Summary Map Dashboard displays the items that you associate with a location.
  2. 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.

So In part 1 of this blog series I’m going to create a PowerShell script to bulk import my  locations and then in part 2 a second script to bulk associate servers to a certain location. Lastly I’m going to utilize all those locations and GPS coordinates in a map.

The following PowerShell script will add the Longitude and Latitude coordinates of about 790 cities from a CSV file. You can download the CSV file from here.

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

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

$MS = "SCOMSERVER4"

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

#//----------------------------------------------------------------------------
#//  Main routines
#//----------------------------------------------------------------------------

foreach ($entry in $list)
{

$name = $entry.Name
$Long = $entry.Long
$Lat = $entry.Lat
#Set location
New-SCOMLocation –DisplayName $Name –Latitude $Lat –Longitude $Long

write-host Location $name added

}

Stay tuned for part 2.

Alexandre Verkinderen

Avatar of alkin

by alkin

Install OpsMgr Agent-less remotely with Powershell

2:04 pm in Powershell, SytemCenter by alkin

In our previous post we installed the OpsMgr agent remotely with Poweshell and enabled agent proxying. Now we are going to monitor a server agentless via Powershell:


#=======================================================================
#
# NAME: Opsmgr 2012 Agent-less Install
#
# AUTHOR: Alexandre Verkinderen
# DATE  : 10/23/2013
#
#Requirements: The Operations Manager Powershell module needs to be installed
#
# COMMENT: This script is designed to install OpsMgr 2012 agent-less
# The following need agent-less installation using default options: Add-SCOMAgentlessManagedComputer <a href="http://technet.microsoft.com/en-us/library/hh918462.aspx">http://technet.microsoft.com/en-us/library/hh918462.aspx</a> : SCDPM01, SCCM01
#=======================================================================

#Variables
$MS = "SCOM01.contoso.com"

invoke-command -ComputerName $MS{
$AgentList = @("scdpm01.contoso.com","sccm01.contoso.com")
 $MS = "SCOM01.contoso.com"

#Import PowerShell Modules
import-module OperationsManager
#Connect to OpsMgr Management Group
New-SCOMManagementGroupConnection -ComputerName $MS

#--------------------------------------------------------------
#OpsMgr Agent Installation
#-----------------------------------

Foreach($Agent in $AgentList)
{

Add-SCOMAgentlessManagedComputer -Name $Agent -ManagedByManagementServer (Get-SCOMManagementserver -Name $MS)

}
}

Thanks,

Alexandre Verkinderen

Avatar of alkin

by alkin

AEM ADMX File for OpsMgr 2007 R2

6:31 am in Uncategorized by alkin

Last week I was at a customer to implement AEM.

The customer is fully on Windows 2008 R2 and Windows 7 and only want to use ADMX files and not ADM files to configure his GPO’s. And here is the issue….When running the AEM configuration wizard the settings are stored as an ADM file not an ADMX file.

image

Note that the ADM file format that the wizard provides will work on Windows 7 and W2K8 R2 but some companies have new policies in the place which require them to only use ADMX file types and so this is the stop gap solution for now.

Luckily the product team just release yesterday an ADMX file for OpsMgr 2007 R2!! http://blogs.technet.com/b/momteam/archive/2011/06/08/aem-admx-file-for-opsmgr-2007-r2.aspx  Notice that this has been through very limited testing but it worked like a charm in my customer environment!

So a big thank you to the product team and especially Satya to help me out with this.

thank-you

Thanks,
Alexandre Verkinderen

Avatar of alkin

by alkin

The System Center Management service terminated with service-specific error %%-2147467259

5:19 am in Uncategorized by alkin

I had the following issue on one of my servers

“The System Center Management service terminated with service-specific error %%-2147467259” when I wanted to start my Healthservice.

image

 

When searching the internet I found the following blogpost http://blogs.technet.com/b/smsandmom/archive/2008/04/30/opsmgr-2007-healthservice-service-fails-to-start-with-25362-warning.aspx  . The blogposts says that the State directory registry key can be corrupt but that was fine in my case.

But at the end of the blogpost I found my solution:

This error can be caused by the WindowsAccountLockDownSD Key in at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HealthService\Parameters\Management Group\<Management Group Name Here> being invalid or non-present.  And indeed, that was my issue: the WindowsAccountLockDownSD Key was missing on my server.

 

image

The easiest way to resolve the issue with the Windows AccountLockDownSD key is to export the registry key from a similar, working system and then import it in to the registry of the server experiencing the problem.  Once this is complete the HealthService should start successfully.

image

 

thanks,

Alexandre Verkinderen

Avatar of alkin

by alkin

Best of MMS is coming: 15 june 2011

5:31 am in Uncategorized by alkin

For our best of MMS on June 15 we will have a special guest! Chris Childers is coming to Belgium!

 

chrisChris Childers  has over 15 years of product management and business development experience in growth stage software companies. Chris joined Microsoft as a Senior Program Manager in the System Center team through the AVIcode acquisition. While at AVIcode, Chris held roles in Product Management and Business Development with a focus on building a partner eco-system. Prior to AVIcode, Chris co-founded Artifact Software where he managed the company’s product development and was instrumental in building its first generation product, acquiring early adopter customers and securing funding. Chris also served as Director of Product Management at Sequoia Software and Senior Technical Evangelist at Citrix Systems. When Chris is not working he can be found cycling the back roads of Maryland.

 

 

This is our agenda of the day. For the very first time we now have two tracks:

The Tracks

 

Hour

Track 1

Track 2

09:00 – 09:30

Welcome and Registration

Welcome and Registration

09:30 – 09:40

Introduction

Introduction

09:40 – 10:40

Introduction to Opalis and a Sneak Peek at System Center Orchestrator

SCDPM: DPM 2012: What goodies are coming

10:40 – 11:40

System Center Configuration Manager 2012

System Center Service Manager 2012 overview

11:40 – 12:30

Lunch

Lunch

12.30 – 13.30

Configuration Manager 2012 – Deployment and Infrastructure Technical Overview

Managing your Fabric with System Center Virtual Machine Manager 2012

13.30 – 14.30

AVIcode: Overview of Application Monitoring That You Can Do Today

Managing your Fabric with System Center Virtual Machine Manager 2012

14.30 – 15.00

Break

Break

15.00 – 16.00

Operations Manager 2012: Overview, Setup and Configuration

Windows Intune: PC Management with Cloud Services

16.00 – 17.00

Technical Overview of System Center Advisor ("Atlanta")

 

17.00 –

Networking

Networking

 

 

More Information

Location

ALM Point Antwerpen
Filip Williotstraat 9
2600 Berchem

Date

June 15, 2011

Webpage: http://technet.microsoft.com/nl-be/ff628215

Register for the in-person event: https://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032487389&Culture=en-US

Register for the live meeting: https://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032487391&Culture=en-US

thanks,

Alexandre Verkinderen

Avatar of alkin

by alkin

Hp bladesystem enclosure monitoring manager requested registry access is not allowed

5:18 am in Uncategorized by alkin

You need to open the HP bladesystem enclosure monitoring manager as an Administrator. Otherwise you will have the following error:

“hp bladesystem enclosure monitoring manager requested registry access is not allowed”

image

Special thanks to Shay Levy for pointing this out.

 

Alexandre Verkinderen

Avatar of alkin

by alkin

HP Blade System MP installer does not install the mp file

5:16 am in Uncategorized by alkin

If you want to use the latest HP blade management pack 1.40 you need to install or upgrade your HP proliant MP first to the same version 1.40.

image

The documentation doesn’t really say but it’s crucial. If you don’t install the Proliant mp first the Blade System MP installer will not import the blade management pack or even install it locally.

thanks,

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

 

SNAG_Program-0272

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

SNAG_Program-0273

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

image

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

image

Thanks,

Alexandre Verkinderen

Avatar of alkin

by alkin

System Center Roadmap 2011

1:20 pm in Uncategorized by alkin

I’m so excited about the direction that Microsoft is taking with the new System Center products!

Below you find the roadmap of the System Center products and what is going to be released soon!

Thanks,

Alexandre Verkinderen

Visit Us On TwitterVisit Us On Linkedin