SCOM Remote Maintenance Mode Scheduler 2.0

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 2012

Download for 2012: SCOMRemoteScheduler2.0_R2.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

 

137 Responses to SCOM Remote Maintenance Mode Scheduler 2.0

  1. Walter Chomak October 6, 2008 at 12:57 pm #

    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!

  2. Marc Cluke October 9, 2008 at 1:07 pm #

    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.

  3. admin October 9, 2008 at 1:13 pm #

    Marc, create a group with the list of your servers and put the group in Maintenance Mode.

  4. Andrew October 16, 2008 at 1:36 pm #

    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….

  5. David October 21, 2008 at 7:33 pm #

    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

  6. David October 22, 2008 at 7:52 pm #

    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

  7. FastBitz October 23, 2008 at 6:53 am #

    Terrific Solution!!! Thanks very much.

  8. Roger October 24, 2008 at 11:46 am #

    Does this tool also put the health service and health service watcher into maintenance mode for the specified server?

  9. Alex October 24, 2008 at 1:03 pm #

    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?

  10. admin October 24, 2008 at 1:10 pm #

    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?

  11. Alex October 24, 2008 at 4:20 pm #

    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.

  12. Ross October 27, 2008 at 11:32 am #

    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

  13. Samson November 17, 2008 at 5:42 am #

    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

  14. HanZi November 18, 2008 at 11:10 am #

    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

  15. Chris November 20, 2008 at 1:23 pm #

    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

  16. Chris November 20, 2008 at 1:36 pm #

    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.

  17. admin November 20, 2008 at 1:40 pm #

    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

  18. Manjun November 21, 2008 at 12:13 pm #

    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

  19. Ben November 23, 2008 at 8:27 pm #

    Hello
    Is it possible to specify a single server to place into maintenance mode with the tool instead of a group?
    Thanks
    Ben

  20. admin November 23, 2008 at 8:32 pm #

    Yes just select the computer Tab at the top.

  21. MichaelW December 23, 2008 at 1:03 am #

    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..

  22. Tom December 23, 2008 at 6:23 pm #

    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?

  23. admin December 23, 2008 at 6:51 pm #

    No it cannot be used for SNMP devices right now. If you look at https://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}

  24. Tom December 23, 2008 at 8:06 pm #

    so when running the command, where it says -urlName can i substitute the group name that contains SNMP devices?

  25. Marcus August 9, 2009 at 8:14 pm #

    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 August 9, 2009 at 9:51 pm #

      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

  26. Trond Hindenes September 2, 2009 at 12:46 pm #

    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

  27. Dominique September 16, 2009 at 8:20 pm #

    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 0x8007007B

    Let me know,
    Thanks,
    Dom

  28. Dominique September 16, 2009 at 8:24 pm #

    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

  29. Kees: October 6, 2009 at 8:33 am #

    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

  30. Bryan October 13, 2009 at 8:15 am #

    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!

  31. Jon October 26, 2009 at 4:01 pm #

    Great work Tim,
    I look forward to the new version of this tool as the environment I am working in is R2.

  32. Johan October 29, 2009 at 3:06 am #

    Great tool!

    Thank you

  33. Joel November 5, 2009 at 7:36 pm #

    Any news on that new version for R2. I’m really keen to implement it into my environment!

  34. Jeramey November 11, 2009 at 3:41 pm #

    Do you think that you will ever enable an import csv file function? That would be nice on the computer tab.

  35. Lars November 12, 2009 at 4:34 am #

    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?

  36. Michael November 24, 2009 at 4:46 pm #

    Hi-

    Any word on when the next version will be released with R2 support? Love this tool!

  37. Shay December 11, 2009 at 5:43 pm #

    Also anxiously awaiting R2 version….

    Thanks for the great app.

  38. Mark December 16, 2009 at 10:46 am #

    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.

  39. Chad December 18, 2009 at 10:08 am #

    Any word on the version of the scheduler for R2?

  40. Andreas January 21, 2010 at 1:53 pm #

    Can you say when the new version will be available?

  41. Michael February 4, 2010 at 8:48 am #

    Awesome tool! I have installed on my computer (running R2). It says “success” when i create it, but it doesnt seem to get into maint. mode.

    Also, the time is a little confusing. How do i set it in mm from 13.30 – 14.00 for instance?

    Thanks a lot!

  42. Michael February 4, 2010 at 9:51 am #

    Also, is it possible to have the program write an entry in the eventviewer? That would be nice.

    Sorry for double post before 🙂

  43. Scott February 5, 2010 at 1:47 pm #

    Hello, Has anyone installed and attempted to use the SCOM scheduler with and get the following error upon creating a new task.

    “Access is Denied: (Exception from HRRESULT: 0x80070005 (E_ACESSDENIED))

  44. Scott February 5, 2010 at 1:49 pm #

    Hello, after installing the scheduler, I ge the following error when creating a task,

    Access is Denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

    Any ideas??

    Thx

  45. OngBak February 8, 2010 at 10:02 pm #

    Bump for R2 support!

  46. Marty March 16, 2010 at 10:37 am #

    I’m on R2. Do I need to wait for the anxiously awaited “R2 version?”

  47. Rick Shover March 17, 2010 at 4:20 pm #

    Looks likeit would be a great tool, but when I try to run it from the Computer tab I am getting “Network address invalid.” Not sure what to do about that. I tried using teh FQDN for the RMS server – didn’t make a difference. Thanks for any help that you might be able to give.

  48. Dominique April 23, 2010 at 2:43 pm #

    Hello,

    I tried per computers and everything works well.
    When I try to use a group after browsing the list of group I am getting an error:
    “Object reference not set to an instance of an object.”

    What am I missing?
    Thanks,
    Dom

  49. Dominique April 23, 2010 at 3:08 pm #

    I reinstalled it and it works for groups except for nested Groups, is it normal?
    Thanks,Dom

  50. Dominique April 23, 2010 at 3:13 pm #

    Okay Tim I found your comments “Only groups in unsealed management packs will show up” the nested group is a sealed MP so it might be why the machines did not get the MM scheduled, isn’t it?
    Anyway your tool is fantastic… ane very helpful all times…

    Thanks,
    Dom

  51. Doug April 27, 2010 at 1:17 pm #

    It doesnt seem to like any groups with spaces in them which is nearly all of them. I get a Group ‘testing 123’ not found. Works fine for groups which dont have spaces.

    • Tim April 27, 2010 at 6:56 pm #

      I have tested it many times. Groups with a space work fine.

  52. Jason April 28, 2010 at 5:42 pm #

    How about putting domain groups into maintenance in addition to the current SCOM groups?

    • Tim April 28, 2010 at 5:57 pm #

      Not sure what you mean. Can you explain more?

  53. John Bradshaw April 28, 2010 at 9:00 pm #

    Beauty! Works a treat on R2.
    thx Tim,
    John Bradshaw

  54. Krazy May 3, 2010 at 8:33 am #

    works like a charm in R2 … U THA MAN !!!
    Thanks

  55. Mats Augustsson May 17, 2010 at 10:19 am #

    Hi! I have installed it as describe in the document but it don’t work when I scheduler it. It work when I run the command manually as it says in the “Show Scheduler Tasks” under “Program File” and “Command Line”. The task egine windows just flash with some red text, I don’t get time to see the message.

  56. Mats Augustsson May 18, 2010 at 9:07 am #

    Hi! Have solved my problem now. I needed to put some text in “Comment”.

    One other thing: Do you think that you will update this script/program to also have the possibility to just put one application into Maintenance Mode for one server.

  57. Frankg May 21, 2010 at 3:15 pm #

    Great tool ! Could you please add linux machine in the “get-computer” query of your next version ?

    Thanks

    Frank

  58. New2scc August 9, 2010 at 9:38 am #

    Hi, this tool is great but can you schedule to maint mode on monthly basis aswell as the current once/daily/weekly option?

    As a workaround, could I use the tool to create the schedule and then use Task Scheduler to go in and edit the trigger to the monthly requirements?

    Cheers

  59. Steven August 16, 2010 at 12:35 pm #

    Hi Guys,
    I have a question in regard VMs on a cluster
    1.Can scom start maintance mode for the server in the cluster if a physical switch fail.
    2.How t trigger scom to move vm with scvmm.
    3.Is there script how to detect netwrok failures.
    Thnaks

  60. Thomas Rae September 9, 2010 at 12:51 pm #

    I have tried to run this and I am running 2007 R2 of Ops manager. I am getting an informational stating the task stopping due to timeout reached. And it has never put the system into maintenance mode. I am using an account that is on a machine I am trying to run this against. Anyone have any suggestions.

  61. Murad September 23, 2010 at 12:36 pm #

    It is not practical for us to create combination of server groups in SCOM (i.e. few AD, SQL, Exchange, IIS etc) every time we need to put them in maintenance mode. There is a potential of performance hit by creating too many groups in SCOM so It would be really nice/helpful to allow us to use/import a server list (excel, txt, csv etc) instead of groups or single computer etc.

    Here is a use case for this requirement: We have about 600 Windows servers running different roles/applications and are being managed/administered by different application owners/groups. They are responsible for installing/uninstalling/configuring there apps and whenever they need to put their servers in MM they should be able to just use a list of servers as suppose to SCOM admin creating a group for each app/server owner.

  62. bernd October 7, 2010 at 4:50 am #

    I have tried to use a group with only SQL Server and SQL Agent members included.
    The reason for this to avoid alerts while running sql backup but to keep monitoring running for the rest of the maschine.
    Now I found out that your ps-sript for group only looks for class windows computers.
    Maybe you can add another tab like group for objects or change the ps script for include more than only windows computers.
    The idea from Frankg is good. We have too Linux maschines.

    Is there a Lifecycle plan for this tool ?
    Thanks,

    Bernd

  63. RW October 28, 2010 at 12:14 pm #

    Application doesn’t work locally or remotely when the Security Policy “Network access: Do not allow storage of credentials or .NET Passports for network authentication ” is set to Enabled. This pretty much kills this applications value in our environment if there’s not a workaround for it.

    I too also get the Access Denied error trying to reach out to the target server, even if I’m running it locally as an Administrator account that as Admin level access to the target server.

  64. Mats Augustsson December 10, 2010 at 5:59 am #

    Hi! How can I use 24 hours time stamp in the start time options? We use 24 hours time stamp in our server in Sweden.

  65. Denyse January 5, 2011 at 3:30 pm #

    This tool seems to work great for server objects, but I can’t seem to get other objects (like icmp) to go into maintenance mode with this tool. If I add the icmp objects into a group, and schedule a task, the task will run, however, the icmp objects never seem go into maintenance mode. Am I missing something or is this not part of the functionality of this tool?
    Looking forward to your response. 🙂

  66. Nicolaj Rasmussen January 20, 2011 at 10:05 am #

    I have the same problem as MichaelW.

    We have a dynamic group that is populated withh all agents using “( Object is Agent AND True )”.
    In the OpsMgr Ops Console it is populated with members – but when running the command manually:

    C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe C:\MaintenanceModeV4\GroupMaintenanceModeV4.ps1 -rootMS: ‘omms-01’ -groupName: ‘All Agents’ -minutes:240 -comment: ‘Maintenance Window 01-05’ -reason: ‘PlannedOther’ -startMM:$true

    I get the message:
    0 computers found in the ‘ADP – All Agents’ group

    Will the script not work with dynamic groups?

    Thanks for any help!

    /Nicolaj

  67. Kevin Rice January 27, 2011 at 4:52 am #

    Nicolaj,

    The scripts should be able to pick up the members in the group. Although, I’m having the same problem others have mentioned regarding spaces in the group names in my case. However, I tracked that down as being due to running the script from Powershell 1.0 under Windows 2003 R2 directly as opposed to calling Powershell from the Windows command line which is what the scheduled task does.

  68. Sascha February 1, 2011 at 11:28 am #

    Is there any update avaialable to make this nice tool working on a Windows 7 computer?
    Thanks for your help.

    • Tim McFadden February 1, 2011 at 11:30 am #

      It works fine on Windows 7. What is the issue?

  69. Steve February 2, 2011 at 11:18 am #

    Hi The problem is I when I use run as to run the application I am able to get through to the GET GROUPS or GET COMPUTERS button but as soon as I click on it I get the error

    ************** Loaded Assemblies **************
    mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4952 (win7RTMGDR.050727-4900)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
    —————————————-
    Scom Scheduler
    Assembly Version: 1.7.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Users/myname/Desktop/Scom%20Scheduler.exe
    —————————————-
    System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    —————————————-
    System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
    —————————————-
    System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    —————————————-

    ************** JIT Debugging **************
    To enable just-in-time (JIT) debugging, the .config file for this
    application or computer (machine.config) must have the
    jitDebugging value set in the system.windows.forms section.
    The application must also be compiled with debugging
    enabled.

    For example:

    When JIT debugging is enabled, any unhandled exception
    will be sent to the JIT debugger registered on the computer
    rather than be handled by this dialog box.

    • Tim McFadden February 2, 2011 at 11:23 am #

      Try this. Remove the application. Update your .Net framework. Then re-install it.

  70. Keithk February 8, 2011 at 5:10 pm #

    When I tried putting a group after browsing the list of group I got the error:
    “Object reference not set to an instance of an object.”

    I found that in the comments section I was using a date that contained “/” (minus the quotes)which caused the problem. When I changed the date from “/” to use “-” it worked fine. For example a comment using 2/4/2011 would not work, but a comment using 2-4-2011 would work.

  71. PhilipL March 16, 2011 at 12:57 am #

    Great tool.. Found that the maintenance mode works but am unable to see the icon appear in SCOM. Also tasks dont appear to be ending in the duration requested. Often have to end the task manually. Thanks

  72. Anand V March 22, 2011 at 6:03 pm #

    Fantastic. Just what I looking for. Thanks for creating this awesome program.

  73. Sameer April 1, 2011 at 1:50 pm #

    This had always been a great working tool for me. Recently I changed jobs, and at this new venture I installed the tool for everyone to use. But unfortunately it does not work. Probably because this is win2k8 servers. I tried installing it on the server too, but when I click on create it errors out.
    Under Groups when I click on Create it errors out to – Object Reference not set to an instance of an object
    Under Computers tab When I click on Get computers it errors out – cannot connect to RMS.

    Last week I could schedule it for the groups and not individual computers, but from this week, even the groups i cannot schedule. Anyone experience anything similar?

  74. KevinW April 11, 2011 at 3:13 pm #

    I was also getting “Object reference not set to an instance of an object.”

    I was putting a time 7:15PM into my comment, once I removed this (I’m guessing the ‘:’ gave it problems) it works fine!

    Thanks for this tool, shame on MS for not including recurring maintenance capability.

  75. Jeff B April 21, 2011 at 11:38 am #

    I am having the same issues as PhilipL. The tool works great and the script kicks off MM for my specified server. When I look at the server under monitoring it even has the End Time correctly noted however MM doesn’t actually end. Any ideas Tim?

  76. rubin May 6, 2011 at 3:02 pm #

    Hi Tim, Great Tool..
    I tried to use it today to schedule some maintenance on servers but when I hit “Get computers” it did not discovered Unix servers but windows servers shows up.
    Is the tool can get Unix servers appeared as well ?

  77. Mark May 9, 2011 at 7:24 am #

    Got the problem with 0 computers found in the group too. Anyone got a solution? I am sure that there are members in the group. When i schedule a task for only 1 computer it works fine.

  78. Jason D May 9, 2011 at 12:48 pm #

    **Feature Request: The ability to include “Sealed MP Groups” in the app.

    – All my custom MPs are sealed. Due to this I am not able to see any of my groups in the app. Generally I have to just pick one of the groups, go to Task Scheduler and edit the parameters to include the groups from the sealed MP that I want. Otherwise, loving this tool.

  79. Dominique June 15, 2011 at 4:29 pm #

    Hello Tim,

    I am trying to use the Groups but the machine does not show the for “Maintenance Mode” I checked the Task Scheduler it is in and ran okay… I checked the SCOM Scheduler it is listed as done…

    Any over troubleshooting steps to see why I do not see the maintenance Mode Symbol listed!!!
    Thanks,
    Dom

  80. Priscilla July 5, 2011 at 1:36 am #

    The task is created in task scheduler, however it will not run from the task scheduler. I click run, it appears to sucessfully complete but nothing happens.
    If run in Windows PowerShell:
    C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe C:\MaintenanceModeV4\AgentMaintenanceModeV4.ps1 –rootMS: ‘RMS Server’ -computerPrincipalName: ‘ServerName’ -minutes:6 -comment: ‘Job Name’ -reason: ‘PlannedOther’
    It works fine and the server is put into maintenance mode.
    Both Agent and Server have ExecutionPolicy set to unrestricted.
    Why won’t it run for task scheduler? Please help! Thanks.

  81. Bryan heath August 15, 2011 at 11:12 am #

    Will you design this for SCOM 2012? I have a lab and it does not seem to be working. Also can I create any sort of group of items and put them in MM? IE. Put this APP Pool, IIS server and Sites into MM.

  82. Helen August 22, 2011 at 10:22 pm #

    Agent/GroupMaintenanceModeV4.ps1 script works for servers into maintenance in our environment. I have also found more script for web application maitenance URLMaintenanceModeV4.zip and it works without any problem.

    I’m not powershell guru, is it possible to combine those two scripts into one?

  83. SorenDK September 9, 2011 at 4:21 am #

    I have mix a litte bit + Automatically Starting Maintenance Mode When Servers are Rebooted for Patching « Operating-Quadrant:

    I have made a solutions that works on 500 server and quick.

    ———————————
    A Subscription / monitor

    EVENT ID 1074

    ————————————-

    A have made a Channel command (Powershell)

    D:\auto\xxxx.ps1 –rootMS: ‘xxx-rms01’ -computerPrincipalName: ‘$Data/Context/DataItem/ManagedEntityDisplayName$’ -minutes:5 -comment: ‘Server is being restarted, and will be in maintenance mode for 5 minutes from $Data/Context/DataItem/TimeRaisedLocal$ ‘ -reason: ‘PlannedOther’

    ————————————-

    Script (xxxx.ps1)

    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

    $computerCriteria = “PrincipalName=’” + $computerPrincipalName + “‘”
    $computer = get-monitoringobject -monitoringclass:$computerClass -criteria:$computerCriteria

    $startTime = [System.DateTime]::Now
    $endTime = $startTime.AddMinutes($minutes)

    if($computer.InMaintenanceMode -eq $false)
    {
    “Putting ” + $computerPrincipalName + ” into maintenance mode”
    New-MaintenanceWindow -startTime:$startTime -endTime:$endTime -comment:$comment -Reason:$reason -monitoringObject:$computer
    }

  84. Tero Ilenius January 9, 2012 at 5:22 pm #

    To how many jobs does this tool scale approximately?

    -Tero

  85. Sandeep Mistry January 18, 2012 at 5:40 am #

    Hell Folks, This Tool is working Nice but i have one small problem.
    On the Schedule set time, i see once PS Script is running but it’s prompting for me to press R for Running this Script. How can we set so that it’s always run without any confirmation.

    Thanks in Advance…

  86. Brad Bird February 23, 2012 at 4:54 pm #

    Hi Tim, this tool is great! Have you an example of how to modify the script to pick up all objects in a specified group regardless of what type of objects they are?

    I have a need to schedule maintenance mode but my need is not for computer objects. It is for: IIS Server, IIS Website, IIS Application Pool and some F5 LTM Pool Members in addition to some Web Transaction objects.

  87. Brad Bird February 24, 2012 at 11:05 am #

    Hi Tim, just an update. I got the tool to work successfully only if something is entered in the Comment field. If the comment field is left blank, the task appears to run successfully but nothing happens.

    Only by running the script with its’ arguments manually do you find that if the -comment parameter is invoked, it cannot be null.

  88. redi311 May 1, 2012 at 6:20 pm #

    this script doesn’t work for me for my unix boxes. I modified the script and replaced $windowsComputerClass variable with $unixComputerClass and changed where this is set to Microsoft.Unix.Computer instead of Microsoft.Windows.Computer class. This works, but in its default state, the script does not work for unix agents. -Redi

  89. Alex July 12, 2012 at 7:22 am #

    Thanks for that greate tool! It works pretty perfect, the only thing is that the start time is not complete. I cannot see if the time is am or pm. Do you know where the error is? i have a german OS.
    Maybe it is possible to change the time from am/pm to 0-24?

    Best regards
    Alex

  90. David Hove July 16, 2012 at 7:49 am #

    I’ve run into a problem with the scheduler, it’s not putting computers or groups into maintenance mode, has been working for a couple of years ok up until now and everything looks normal as far as I can see apart from this.

    Looked at the Powershell event log and I see a number ‘Provider’ started entries for Powershell events occurring at the scheduled time, however these are quickly followed by ‘Provider’ stopped entries 4 seconds later. Just wondered if this is normal behaviour or a sign of something wrong?

    Are you able to provide me with any pointers to potential solutions.

    Great solution by the way, much appreciated.

  91. Andrew September 13, 2012 at 12:16 pm #

    I have 2 questions:

    Is there any plan to update this tool for SCOM 2012?
    It still seems to function with 2012 but wanted to know if an update was coming.

    Would it be possible to add 1st, 2nd, 3rd, 4th, Last / Sun, Mon, Tue, etc?

    • Tim McFadden September 26, 2012 at 3:22 pm #

      Yes I will have a Windows 8 version.

  92. Al Howarth October 3, 2012 at 1:31 pm #

    I’m experiencing issues when using this tool for Windows Cluster servers. We receive “cluster is offline (severity critical) or partially online (severity warning)” alerts.

    Is anyone using this tool with Windows clusters?

  93. Al Howarth October 3, 2012 at 1:33 pm #

    P.S.

    Tim, I tried to email you about the cluster issue, although timothymcfadden@scomk2k7.com returns as invalid.

  94. Ross Jurek October 25, 2012 at 10:05 am #

    Tim,
    Is there a way to use this tool without having to have an account as a scom admin? I would like to have this tool in the hands of a normal support person since they are the ones bouncing the server not the scom admin’s.

    Thanks
    Ross

    • Tim McFadden October 25, 2012 at 12:53 pm #

      Yes in the next version this will be available.

  95. Peter Geraghty November 8, 2012 at 11:03 am #

    A great utility that works perfectly!

  96. Sandro November 26, 2012 at 11:31 am #

    a really great tool!
    but unfortunately we cannot use the tool because our servers are working with 24h time-format (european time-zone).
    will this “issue” be fixed?
    thanks…..

  97. Vineeth February 5, 2013 at 7:50 am #

    After running this step:

    $computer = get-monitoringobject -monitoringclass:$computerClass -criteria:$computerCriteria

    I found $computer is null/empty. Though, $computerCriteria and $computerClass show correct values. $computerCriteria is PrincipalName=’=’TESTSERVER’
    .. and $computerClass has Name : Microsoft.Windows.Computer and Description : All Windows Computers

    I dont get any errors either. What value should we see in $computer ?

    All other steps seem to work OK. Please help. Any pointers?

  98. dor March 3, 2013 at 12:12 pm #

    Hi,
    Is it working on SCOM 2012?
    If yes, which file should i download?

    Thanks!

  99. Angel April 9, 2013 at 5:08 pm #

    This appears to work with SCOM 2012. I’m having some trouble with dynamic inclusion, though. It appears that if I put machines into the Explicit Members part of the group, it works just fine. I recently switched to dynamic inclusion though and now the tool won’t put the group in MM. The tool seems to execute just fine and the group is populating correctly. Am I missing something?

  100. Angel April 9, 2013 at 6:55 pm #

    I figured it out. I didn’t put a comment in before creating the task, so the script did not fully execute.
    So yes, it does work on SCOM 2012. The only thing is that it tends to put the RMS server into MM if it happens to be in the group, despite there being code to check for that.
    Aside from that, it works great. Thanks so much!

  101. Angel April 11, 2013 at 2:41 pm #

    Having some issues with clusters here too. I’ll follow up if/when I find a solution.

  102. Rinku August 21, 2013 at 11:49 pm #

    Hi All,

    I am planning to deploy this tool in my environment. My requirement is

    1. Heartbeat for the specific server or Group of servers should not stop while the server in maintenance mode. I want alerts if any server goes down ( shutdown) in a group while in maintenance mode window. Can I do it ?

    What are the changes I have to do ? Please help me.

    Thanks in Advance

  103. Storm December 24, 2014 at 10:25 am #

    This is exactly what I was looking for. Thanks for wrtinig!

  104. Ken Z April 22, 2015 at 11:06 am #

    Hi

    just followed the instructions on importing the MPs and I’m getting a Status Error when trying to import the SCOM2012 Maintenance Mode Scheduler Dashboard MP (the other one imported fine). It says that the Microsoft.SystemCenter.Visualizaton.Compoment.Library and Microsoft.SystemCenter.Visualization.Library MPs are missing. They’re not, and all other MPs/Dashboards are working fine on my SCOM 2012 R2 (fully patched) system.

    Have you seen this before?

    Thanks

    Ken Z

  105. Ken Z May 1, 2015 at 5:26 am #

    Thanks Tim

    that solved my problem.

    Regards

    Ken

  106. Bob Victor August 6, 2018 at 4:25 pm #

    Is this a free Tool?

Trackbacks/Pingbacks

  1. SCOM Remote Maintenance Mode Scheduler v1.7 | Everything System Center Operations Manager 2007 - October 6, 2008

    […]  https://www.scom2k7.com/scom-remote-maintenance-mode-scheduler-20/ […]

  2. Stefan Stranger's Weblog - Manage your IT Infrastructure : OpsMgr Remote Maintenance Mode Scheduler - October 6, 2008

    […] Source: Everything System Center Operations Manager 2007 […]

  3. WebLog de Stéphane PAPP [MSFT] : Planifier la maintenance dans Operations Manager 2007 - November 26, 2008

    […] pour planifier des plages de maintenance sur des groupes de serveurs de manière industrielle : https://www.scom2k7.com/scom-remote-maintenance-mode-scheduler-20/ Posted: Wednesday, November 26, 2008 8:01 AM by spapp Filed under: Information, Operations […]

  4. Walter Chomak's System Center Operations Manager 2007 Landing Zone : Remote Maintenance Mode Scheduler v1.7 - December 3, 2008

    […] Courtesy of Everything System Center Operations Manager 2007 – https://www.scom2k7.com/scom-remote-maintenance-mode-scheduler-20/ […]

  5. SCOM: Automatically Starting Maintenance Mode When Servers are Rebooted for Patching « Operating-Quadrant - August 15, 2009

    […] more efficient.   These include:  Tim McFadden’s remote maintenance mode scheduling utility:  https://www.scom2k7.com/scom-remote-maintenance-mode-scheduler-20/ and Clive Eastwood’s AgentMM utility: […]

  6. Operations Manager 2007 R2: Extensions « System Center Spartan - August 31, 2009

    […] that we use multiple ones… From running a PowerShell script from the Agent to creating a Schedule Task for MM to the Scheduled Maintenance […]

  7. Everything System Center Operations Manager 2007 » Blog Archive » SCOM Remote Maintenance Mode Scheduler 2.0 R2 Scripts - April 28, 2010

    […] Maintenance Mode Scheduler 2.0 […]

  8. Cameron Fuller - November 8, 2010

    So, I installed OpsMgr. What’s next?…

    I have had a recent experience of working with a recently bu ……

  9. Just Another Maintanance Mode Script for SCOM 2007 | windowspowered - January 25, 2011

    […] https://www.scom2k7.com/scom-remote-maintenance-mode-scheduler-20/ […]

  10. Ramp Up Guide: System Center Operations Manager 2007 R2 - Microsoft Premier Support UK - Site Home - TechNet Blogs - August 3, 2011

    […] Maintenance Mode Scheduler […]

  11. Dude – unseal my MP! - Kevin Holman's System Center Blog - Site Home - TechNet Blogs - October 21, 2011

    […] it again.  He continually writes handy tools and solutions to help the OpsMgr admin.  His Scheduled Maintenance Mode solution is wildly famous.  His latest tool published is something I will use all the […]

  12. Cameron Fuller - November 9, 2011

    Dallas System Center 2012 Event–Q…

    There were several great questions asked during or directly ……

  13. » Best tools for Scheduling maintenance mode in SCOM Techibee.com - November 10, 2011

    […] tool name is “SCOM Remote Maintenance Mode Scheduler“. It seems popular tool in internet for scheduling the maintenance mode since many people […]

  14. SCOM remote maintenance mode scheduler 2.0 « Sistem yönetimi - March 6, 2012

    […] https://www.scom2k7.com/scom-remote-maintenance-mode-scheduler-20/ […]

  15. Consolidated List of Useful Tools and Resources: System Center Operations Manager 2012 « willcode4foodblog - August 23, 2012

    […] and behold, I stumbled upon Tim McFadden’s awesome SCOM Remote Maintenance Mode Scheduler 2.0 It was originally released for SCOM 2007, but I have successfully tested server maintenance […]

  16. » SCOM OpsMgr 2012 How to Automate Maintenance Mode via PowerShell Anoop's | @anoopmannur - December 11, 2012

    […] SCOM Remote Maintenance Mode Scheduler 2.0 Here […]

  17. OpsMgr Tools | My Cloud - April 19, 2013

    […] Link […]

  18. Maintenance Mode Explained « MS-Opsmgr - December 22, 2014

    […] the Operations Manager R2 Admin Resource Kit from here You can also use the community tool: SCOM Remote Maintenace Mode Scheduler writen by Tim […]

  19. So, I installed OpsMgr. What’s next? | Catapult Systems - May 1, 2015

    […] Scheduling Maintenance Mode in a GUI: https://www.scom2k7.com/scom-remote-maintenance-mode-scheduler-20/  […]

  20. Dallas System Center 2012 Event–Q&A (#SYSCTR, #ConfigMgr, #SCORC, #SCOM) | Catapult Systems - May 1, 2015

    […] use a pool to put servers into maintenance mode. The existing tools appears to reference the RMS (https://www.scom2k7.com/scom-remote-maintenance-mode-scheduler-20/ as an example) which implies that the RMS emulator would be the system which would be specified to […]

  21. Operations Manager 2012 Maintenance Mode – CTGlobal - August 22, 2017

    […] To be downloaded at: https://www.scom2k7.com/scom-remote-maintenance-mode-scheduler-20/ […]

  22. SCOM Trick 9 – Maintenance mode tooling | TopQore Blog - April 24, 2020

    […] Remote Maintenance Mode GUI tool https://www.scom2k7.com/scom-remote-maintenance-mode-scheduler-20/ Cluster and maintenance mode […]

Leave a Reply