SCOM Remote Maintenance Mode Scheduler 2.0
October 6th, 2008
SCOM Remote Maintenance Mode Scheduler is a GUI based tool that lets administrators easily schedule maintenance mode for a server or group of servers inside System Center Operations Manager 2007.
Download: SCOMRemoteScheduler2.0.zip
Instructions: SCOMRemoteMaintenanceModeScheduler2.0.pdf
New Features in version 2.0 include
-
Ability to schedule a daily maintenance mode.
-
New Show Scheduled Tasks Dialog.
-
Added feature to see all details for scheduled jobs.
-
Added feature to delete scheduled jobs
-
Fixed Minor bugs

Here is what the new Show Scheduled Tasks Dialog looks like

SCOM Remote Maintenance Mode Scheduler v1.7 | Everything System Center Operations Manager 2007
[...] http://www.scom2k7.com/scom-remote-maintenance-mode-scheduler-20/ [...]
Walter Chomak
Terrific! I was just doing some work which focuses on this functionlity. I am going to link to your post from my blog, hope you don’t mind!
Stefan Stranger's Weblog - Manage your IT Infrastructure : OpsMgr Remote Maintenance Mode Scheduler
[...] Source: Everything System Center Operations Manager 2007 [...]
Marc Cluke
It’s getting there, just not as quickly as we want. In our environment, it would be useful to be able to import a .txt, .csv, or .xls file with a list of servers.
admin
Marc, create a group with the list of your servers and put the group in Maintenance Mode.
Andrew
I am trying this for the first time. Not sure what this error means “The given path’s format is not supported”
Great potential, though, to help in a big way….
David
Hi Tim:
Thanks for the wonderful tool for the newbie SCOM 2007 admins like me.
While running the scheduler, I ran into an issue. I tried to run the code directly from the command shell and I get the following error regarding the “null array”. Copy of your script is below the error message.
Can you tell why I am getting null array?
Thanks,
David
===============================================================
C:\>C:\WIN2k3\system32\WindowsPowerShell\v1.0\powershell.exe C:\MaintenanceModeV
4\AgentMaintenanceModeV4.ps1 -rootMS: `atmspmom04′ -computerPrincipalName: ‘atms
pasv01′ -minutes:30 -comment: ‘atmspasv01′ -reason: ‘PlannedOther’
PathName :
ManagementGroup : SCOM2007DC2
ManagementServerName : atmspmom04
Drives :
You cannot call a method on a null-valued expression.
At C:\MaintenanceModeV4\AgentMaintenanceModeV4.ps1:13 char:56
+ $healthServices = $computer.GetRelatedMonitoringObjects( <<<< $healthServiceC
lass)
Cannot index into a null array.
At C:\MaintenanceModeV4\AgentMaintenanceModeV4.ps1:14 char:34
+ $healthService = $healthServices[0 <<<< ]
Putting atmspasv01 into maintenance mode
New-MaintenanceWindow : Cannot bind argument to parameter ‘MonitoringObject’ be
cause it is null.
At C:\MaintenanceModeV4\AgentMaintenanceModeV4.ps1:22 char:81
+ New-MaintenanceWindow -startTime:$startTime -endTime:$endTime -monitoringObje
ct:$ <<<< computer -comment:$comment -Reason:$reason
Putting the associated health service into maintenance mode
New-MaintenanceWindow : Cannot bind argument to parameter ‘MonitoringObject’ be
cause it is null.
At C:\MaintenanceModeV4\AgentMaintenanceModeV4.ps1:26 char:81
+ New-MaintenanceWindow -startTime:$startTime -endTime:$endTime -monitoringObje
ct:$ <<<< healthService -comment:$comment -Reason:$reason
Putting the associated health service watcher into maintenance mode
New-MaintenanceWindow : Cannot bind argument to parameter ‘MonitoringObject’ be
cause it is null.
At C:\MaintenanceModeV4\AgentMaintenanceModeV4.ps1:30 char:81
+ New-MaintenanceWindow -startTime:$startTime -endTime:$endTime -monitoringObje
ct:$ <<<< healthServiceWatcher -comment:$comment -Reason:$reason
=============================================================
param($rootMS,$computerPrincipalName,$minutes,$comment,$reason)
Add-PSSnapin “Microsoft.EnterpriseManagement.OperationsManager.Client” -ErrorVariable errSnapin;
Set-Location “OperationsManagerMonitoring::” -ErrorVariable errSnapin;
new-managementGroupConnection -ConnectionString:$rootMS -ErrorVariable errSnapin;
set-location $rootMS -ErrorVariable errSnapin;
$computerClass = get-monitoringclass -name:Microsoft.Windows.Computer
$healthServiceClass = get-monitoringclass -name:Microsoft.SystemCenter.HealthService
$healthServiceWatcherClass = get-monitoringclass -name:Microsoft.SystemCenter.HealthServiceWatcher
$computerCriteria = “PrincipalName=’” + $computerPrincipalName + “‘”
$computer = get-monitoringobject -monitoringclass:$computerClass -criteria:$computerCriteria
$healthServices = $computer.GetRelatedMonitoringObjects($healthServiceClass)
$healthService = $healthServices[0]
$healthServiceCriteria = “HealthServiceName=’” + $computerPrincipalName + “‘”
$healthServiceWatcher = get-monitoringobject -monitoringclass:$healthServiceWatcherClass -criteria:$healthServiceCriteria
$startTime = [System.DateTime]::Now
$endTime = $startTime.AddMinutes($minutes)
“Putting ” + $computerPrincipalName + ” into maintenance mode”
New-MaintenanceWindow -startTime:$startTime -endTime:$endTime -monitoringObject:$computer -comment:$comment -Reason:$reason
“Putting the associated health service into maintenance mode”
New-MaintenanceWindow -startTime:$startTime -endTime:$endTime -monitoringObject:$healthService -comment:$comment -Reason:$reason
“Putting the associated health service watcher into maintenance mode”
New-MaintenanceWindow -startTime:$startTime -endTime:$endTime -monitoringObject:$healthServiceWatcher -comment:$comment -Reason:$reason
David
Hi Tim:
I figured out that if I am using the FQDN instead of netbios name, it works.
However, I have one question. Your program is setting the default location of the powershell program to c:\windows and I need to change that to c:\win2k. What do I change to give correct location of the powershell program?
Thanks,
David
FastBitz
Terrific Solution!!! Thanks very much.
Roger
Does this tool also put the health service and health service watcher into maintenance mode for the specified server?
Alex
It doesn’t look like this tool puts the health service and health service watcher into maintenance mode for the specified server. I still receive heartbeat failure notifications when I shedule a server for maintenance mode. Can the health service and health service watcher be added into this utility?
admin
Yes it does puts the health service and health service watcher into maintenance mode for the specified server. Are the scripts firing correctly? Did you try to fire the scripts outside of a scheduled task?
Alex
Sorry… I took a look at script now. I see that it does include the health service and health service watcher. The reason it wasn’t working is because I was receiving the “Security Warning”, I unblocked the file and all is well. Thanks.
Ross
Nice tool but 1 draw back i’ve noticed.
It creates the scheduled task on the task server to run using the specified credentials but it uses the account you are logged on as to connect to the task server in order to create it – hence doesn’t work.
In our environment our normal logon accounts don’t have access to servers. We have admin accounts for this.
We could run the scheduled tasks on our local PCs but for centralisation and managment this is not good. What happens if a patch goes out overnight and my pc gets rebooted? The task might not run.
Runas doesn’t work easily for this tool either. I have to runas my cmd line as my admin account and then cd to the shortcut and run that – pain in the neck.
The only alternative i can see is have everyone login to the task server and use the tool from there but again only 2 (or 3) users connecting at once via RDP.
I’m sure in most environments this works a treat.
Has anyone else come across this issue? Thanks
Samson
The scheduler is a fantastic tool. But in our case it doesn’t work properly.
It seems that the script started successfully but the target server is not
set in a maintenance mode. I have tried several times with different accounts
on different group and on single server the result is the same. I installed
the scheduler according to your instruction. What is goes wrong. Is there any
log file to look?
Thanks,
Samson
HanZi
Hi
Was attempting to install onto our new test bench to see if it fulfills our Maintainance Mode problem.. However it fails at the first hurdle 1) Tries to load .net 3.5 (even thought we hve it installed) then the scheduler setup failes with “application requires that assembly system.core version 3.5.0.0 be installed in the GAC first.”
All the best
Hans
Chris
I agree with Ross, any chance the next release will have the run-as option? We have people in our datacenter that do the monthly server patching and I would like to let them use this tool. They have an admin account and a regular account. There admin account as admin access to the RMS but there regular account does not. So for this scheduler tool to work they would have to be logged into their machine with there admin account. Right now i have their regular account as admins on the RMS but this is not ideal for many reasons. A run as option would make this tool PERFECT. otherwise for the rest of us admins it has worked flawless. Thanks
Chris
Nevermind about my last post, i got it working. The run-as option does not work with the shortcut that is created during install. If you go to the following directory C:\Documents and Settings\Yourname\Local Settings\Apps\2.0\5EK5NR3C.LTB\LH93A6KO.OGA\scom..tion_bfe6b84180b2a09d_0002.0000_1929c92e134b4a91
and copy the scom scheduler exe to your desktop and shift\right click the run as option is there and it works. So it is now completely flawless.
admin
Chris and Ross you can do a run as if you search for the actual executable or run process explorer to find it. It is stored in your profile. Once you find it you can even create a new shortcut that has the ability to use run as.
Mine is under
C:\Users\tmcfadden\AppData\Local\Apps\2.0\71VQGZ58.OLE\K26N56H6.6VB\scom..tion_bfe6b84180b2a09d_0002.0000_7a7212912dc1142f\Scom Scheduler.exe
XP might be something like
C:\Documents and Settings\tmcfadden\AppData\Local\Apps\2.0\71VQGZ58.OLE\K26N56H6.6VB\scom..tion_bfe6b84180b2a09d_0002.0000_7a7212912dc1142f\Scom Scheduler.exe
Manjun
I am having the same issue as Samson, it did not put the target server in to maint. even I have admin right on task server and target server, I am running the scheduler from my PC that is in the same domain as the servers and the same ID,
Any one knows why and the solution?
Thank you in advance,
Manjun
Ben
Hello
Is it possible to specify a single server to place into maintenance mode with the tool instead of a group?
Thanks
Ben
admin
Yes just select the computer Tab at the top.
WebLog de Stéphane PAPP [MSFT] : Planifier la maintenance dans Operations Manager 2007
[...] pour planifier des plages de maintenance sur des groupes de serveurs de manière industrielle : http://www.scom2k7.com/scom-remote-maintenance-mode-scheduler-20/ Posted: Wednesday, November 26, 2008 8:01 AM by spapp Filed under: Information, Operations [...]
Walter Chomak's System Center Operations Manager 2007 Landing Zone : Remote Maintenance Mode Scheduler v1.7
[...] Courtesy of Everything System Center Operations Manager 2007 – http://www.scom2k7.com/scom-remote-maintenance-mode-scheduler-20/ [...]
MichaelW
Hi,
Setting maintenance mode for a group has given mixed results, it isn’t working for the domain controllers groups. To troubleshoot I’ve copied the cmd directly from scheduled tasks and run directly within powershell. The following is returned:
0 computers found in the ‘XXX-XXX-XXXXXX XXXXX XXXXX’ group
There are definitely group members, ie View Group Members works within the console; with dynamic group memberships.
Setting maintenance mode on computers and other groups appears to be working fine. The spaces in the group name hasn’t been a problem for other groups, only the Domain Controllers group. An option would be just to create separate tasks for each DC.
Any ideas? Thanks..
Tom
Can this be used for SNMP devices, ie if i select a computer but enter the device name or is it ony specific to server objects?
admin
No it cannot be used for SNMP devices right now. If you look at http://www.scom2k7.com/schedule-a-into-url-maintenance-mode/ it should be pretty easy change the powershell script to Get-Monitoring class for SNMP devices.
So change
$URLWatcher = (Get-MonitoringClass -name whatever the correct SNMP class is) | Get-MonitoringObject | where {$_.DisplayName -eq $urlName}
Tom
so when running the command, where it says -urlName can i substitute the group name that contains SNMP devices?
Marcus
Have been running this tool on SCOM 2007 environment and found it extremely usefull. Last week we upgraded to SCOM 2007 R2 and now this tool does not seem to work any more. Have commands changed in R2? Are there modifications that can/need to be made for this tool to function correctly with R2?
Thanks
Tim
I am working on a new version that supports R2. The new version has a bunch of new features and should be out soon.
- Tim
SCOM: Automatically Starting Maintenance Mode When Servers are Rebooted for Patching « Operating-Quadrant
[...] more efficient. These include: Tim McFadden’s remote maintenance mode scheduling utility: http://www.scom2k7.com/scom-remote-maintenance-mode-scheduler-20/ and Clive Eastwood’s AgentMM utility: [...]
Operations Manager 2007 R2: Extensions « System Center Spartan
[...] that we use multiple ones… From running a PowerShell script from the Agent to creating a Schedule Task for MM to the Scheduled Maintenance [...]
Trond Hindenes
Hi,
THis is such a great little tool!
2 requests though:
1. Make the window wider, or at least possible to widen it. Our group names are loooong…
2. Make it possible to set the taskserver/RMS server on a per-computer basis so that all operators are sure to use the same computers for tasks and RMS connection…
Any chance you’ll release the source code for this so others can contribute?
Good woork!
Regards,
Trond Hindenes / Norway
Dominique
Hello,
It is the tool I was looking for, so I did the first steps but now I am blocked with an error:
The files name, directory name, or volume label syntax is incorrect (EXCEPTION FROM HRESULTS 0×8007007B
Let me know,
Thanks,
Dom
Dominique
Hello,
I tried per computer and I did not get the error. So it was per group I got the issue.
Should I see the wrench also within the SCOM Console? so far after 4 minutes I do not have it…
Thanks,
Dom
Kees:
There seems to be a problem with the display/definition of the Start-time in case one has defined a 24-hour clock. I don’t see AM or PM displayed after the time, but the time is not given in 24-hour format either. So it’s rather confusing, and not clear whether the time AM or PM is used.
Regards,
Kees
Bryan
Any word on that r2 version? I am really in need of some kind of schedule. I have reboots occuring automatically for groups of computers almost every night, and my admins are getting very annoied wiht the heartbeat alerts for know reboots.
Thanks!
Tim
I am very close to releasing the next version. It has a ton of enhancements.
Jon
Great work Tim,
I look forward to the new version of this tool as the environment I am working in is R2.
Johan
Great tool!
Thank you
Joel
Any news on that new version for R2. I’m really keen to implement it into my environment!
Jeramey
Do you think that you will ever enable an import csv file function? That would be nice on the computer tab.
Lars
We also love this app, but i have one lite question. If i use the app and put all servers into maintence mode for 4 hours, but after 2 hours all my work is done and now i want to remove the maintence mode on all servers. Is there a simple way of doing that?
Michael
Hi-
Any word on when the next version will be released with R2 support? Love this tool!
Shay
Also anxiously awaiting R2 version….
Thanks for the great app.
Mark
Hello all,
I am trying to modify the powershell script to act on a monitor created by the Management Pack Template “Web Application”. First I run
$monitoringclass = get-monitoringclass -name:Microsoft.SystemCenter.WebApplication.Perspective
Followed by
$monitoringobject = get-monitoringobject -monitoringclass:$monitoringclass -criteria:”SCS Web Other – iExpense”
The second statement fails. When I run it interactively, I get this message:
Get-MonitoringObject : The specified MonitoringClass ‘Microsoft.SystemCenter.Web
lication.Perspective’ is not supported because it is abstract.”
I’m not sure I understand what this means. Can anyone explain the issue or offer any workarounds? Any info would be greatly appreciated.
Chad
Any word on the version of the scheduler for R2?