Hi Everyone,

Recently while working for a customer, I got a query around generating a real time report of all the objects in the maintenance mode. They wanted to schedule a maintenance mode report so that every time they run a report that should display a all the objects (servers, clients etc.) in the Maintenance Mode State. Ideally, when you use Operations Manager console, you can see the objects like servers in the maintenance mode state. However, if you want to generate a report then we have to make use of the Reporting capability & it gives us the historic data by querying on to the Operations Manager Datawarehouse DB. So, when I was looking for a solution to share with my customer, few of my Microsoft colleagues pointed me to a blog post written by Microsoft PFE UK Manageability Team. Microsoft PFE Richard Hawes have written 5 Part blog series around generating different types of HTML based report using PowerShell scripts.

Part 5 of the blog mentioned about generating the real time information of all the objects in the Maintenance Mode.

Here is the link http://blogs.technet.com/b/manageabilityguys/archive/2013/10/01/how-to-create-daily-reports-with-system-center-operations-manager-2012-and-powershell-part-5.aspx

You can download a PowerShell scripts from their blog, which generates a nice HTML based report. So, in a nutshell, you need to use PowerShell to generate the information about what all objects are currently in the Maintenance Mode. Here is a sample

$mc = get-scomClass -name Microsoft.Windows.Computer
Get-SCOMClassInstance  $mc | Where {$_.InMaintenanceMode -eq 'True'}


When you use the PowerShell from the blog you will see the following output in the HTML formatted report.

Of course, since it is PowerShell based cmdlets you can definitely customize the details, fields etc. and also use the scheduling options to generate a report every hour, day depending upon your requirement.

For the detailed instructions, visit the blog by Microsoft UK PFE Team. I hope this is a useful information for all of those looking for this kind of a requirement.

Thank you.

Aviraj Ajgekar
Technical Specialist – Datacenter
Microsoft Corporation – New York Metro