Skip to content
adatum
  • Home
  •  About adatum
  •  Learn Azure Bicep
  •  SCOM Web API
Operations Manager

Health check reports – Updated

  • 18/08/201507/01/2025
  • by Martin Ehrnst

After five years, Pete Zerger and Oskar Landman has released a new, and improved version of their SCOM Health Check Reports. The release was a few weeks ago, but since i did not notice it was updated, maybe you missed it as well.

 

SCOM health check report

 

Some key updates that i have found.

  • Full redesign
  • Additional reports
  • Drill down capabilities

If you are not familiar to these reports i strongly urge you to check them out. It will give you new (and much-needed) insights on your SCOM environment.

Already using version 2?  just install version 3. First time users will have to configure a new data source on your reporting server.

for all your coders, the source code is also available on GitHub

Share this:

  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on X (Opens in new window) X
  • Share on Reddit (Opens in new window) Reddit
Operations Manager

Clone a VM with OpsMgr agent

  • 25/06/201507/01/2025
  • by Martin Ehrnst

Just a short post, and a reminder to my self.

From time to time, you will need to clone a virtual machine, and put this clone in to production. So you Clone, you sysprep, change all it’s configuration and add it back to the domain. So what happens to the OpsMgr agent part of all this?

For the first, you will have a new agent/computer available in your console with the new name. But this agent won’t be able to download any configuration. This is shown by this alert: “Health Service unable to process new configuration” and the agent state for this computer will be shown as critical

If you experience this, you could uninstall the agent, delete it from the console and install everything again, but. What you also could do,

MMC > Certificates > Local Computer > Operations Manager – The certificate is issued to the old computer (yes of course, it is a clone). So instead of uninstall, just stop the healthservice.exe (Microsoft Monitoring Agent), delete the certificate and start the agent back up. And everything should be working as expected.

And next time, uninstall the agent on the clone 🙂

Share this:

  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on X (Opens in new window) X
  • Share on Reddit (Opens in new window) Reddit
Operations Manager

Schedule maintenance mode for group (easy)

  • 08/06/201507/01/2025
  • by Martin Ehrnst

One of the most annoying things whit System Center Operations Manager is the lack of maintenance mode scheduling built in. (You have some options, with Orchestrator, SCCM etc). One thing I personally struggle with, is to maintenance mode every server during Windows Update since we use WSUS for patching and not SCCM. but that’s not the purpose of this post.

In this post, i will guide you through how you can schedule maintenance mode for a (SCOM) group of computers with tools you already have installed – Powershell and Task Scheduler. In our environment we have some Citrix XenApp servers which are scheduled to reboot every night. Since they boot at the exact same time they are easier to maintenance mode than all other servers that boot randomly during updates.

This post will guide you through the following.

  • Create a dynamic group containing the servers (I will use OU in this example, but you are free to use what ever you like)
  • The Powershell script to run against OpsMgr
  • Configuration of the Scheduled task.

Creating the dynamic group

Under Authoring in your console, create a new group. I have called mine “Citrix Servers” stored in a custom management pack. Under dynamic members you will have to create a formula to populate the group members. Her you can choose the solution that fit your needs, but I will be using OU, as our Citrix servers are stored in their own OU.

Dynamic group based on OU
Dynamic group based on OU

( Object is Windows Computer AND ( Organizational Unit Matches wildcard *OU=Citrix* ) AND True )

If you have some servers in the same OU, that you do not want included in this group. You can add them in the “exculded members” pane. Once your group is created, allow for the “System Center Minute” to complete, and if everything is OK, you should see your servers.

TIP: Finding a coumputers OU. Check its Properties under Windows Computers

 

The Powershell script and task

Since were not allowed to start maintenance mode ahead in time, we have to rely on our favorite automation tool called Powershell. In the OpsMgr module there is a Cmdlet, Start-ScomMaintenanceMode, which have a time variable.

Start-MaintenanceMode on technet

param($ManagementServer, $GroupName, $Minutes, $Reason, $Comment)

Import-Module OperationsManager #Import the opsmgr module
New-SCOMManagementGroupConnection -ComputerName $ManagementServer #connect to MS
$SCOMGroup = Get-SCOMGroup | where {$_.DisplayName -like "$GroupName"} #Get the scom group to maintenance
$Time = ((Get-Date)).AddMinutes(($Minutes)) #get time and date. Add minutes. This will be how many minutes object is in maintenance mode
Start-SCOMMaintenanceMode -Instance $SCOMGroup -EndTime $Time -Reason "$Reason" -Comment $Comment
-Command "z:\path\script.ps1 - ManagementServer 'ManagementServerFQDN' -GroupName 'GroupDisplayName' -Minutes 'XX' -Reason 'YourReason' -Comment 'YourCommentHere' ; exit $LASTEXITCODE"

Creating the task

Start by creating a new Scheduled task. Under triggers, set the time and all other configuration you will need.

Under ‘actions’ browse to system32 and add powershell as the program to run. (C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe) Under arguments, edit to fit your needs and paste in the above.

Reasons accepted

— PlannedOther
— UnplannedOther
— PlannedHardwareMaintenance
— UnplannedHardwareMaintenance
— PlannedHardwareInstallation
— UnplannedHardwareInstallation
— PlannedOperatingSystemReconfiguration
— UnplannedOperatingSystemReconfiguration
— PlannedApplicationMaintenance
— ApplicationInstallation
— ApplicationUnresponsive
— ApplicationUnstable
— SecurityIssue
— LossOfNetworkConnectivity

Verify that everything works as expected

Event Viewer

mainteventID

Operations Console

MaintFinish

 

Hope this get you on your way to schedule maintenance mode. When I decide to use SCCM to do our patching, or we come up with another idea, I will let you know.

As always – complete this in your test environment to confirm it’s working.
PS: Operations Manager 2016 will have scheduling built in.

Share this:

  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on X (Opens in new window) X
  • Share on Reddit (Opens in new window) Reddit

Posts pagination

1 … 11 12 13 14 15

Popular blog posts

  • Azure Application registrations, Enterprise Apps, and managed identities
  • Azure token from a custom app registration
  • Windows Admin Center with SquaredUp/SCOM
  • Azure AD authentication in Azure Functions
  • Using OMS and Azure Functions to restart Azure Web App

Categories

Automation Azure Azure Active Directory Azure Bicep Azure DevOps Azure Functions Azure Lighthouse Azure Logic Apps Azure Monitor Azure Policy Community Conferences CSP Monitoring DevOps GitHub Guest blogs Infrastructure As Code Kubernetes Microsoft CSP MPAuthoring OMS Operations Manager Podcast Powershell Uncategorised Windows Admin Center Windows Server

Follow Martin Ehrnst

  • X
  • LinkedIn

RSS feed RSS - Posts

RSS feed RSS - Comments

Microsoft Azure MVP

Martin Ehrnst Microsoft Azure MVP
Adatum.no use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it. Cookie Policy
Theme by Colorlib Powered by WordPress