Enough with the Maintenance Mode tools!!!

OK, I've got one more!  🙂 

I put together a web application to help with maintenance mode.  This was my first attempt at building a web application so I'm sure there are inefficiencies and better ways to do it - so be kind with the comments!

I wrote this tool because I haven't seen anything that allows you to setup maintenance mode for remote systems without either having to logon to the RMS, use the operator console or install software/powershell on the remote systems.  This utility does a few things

-Operates on both individual agents and groups
-Allows 'right now' configuration of maintenance mode
-Allows future scheduling of maintenance mode
-Displays systems currently in maintenance mode
-Seems to work for both OpsMgr administrators and standard, non-OpsMgr, users by making use of the account configured in the web page application pool.  I say seems because I've only done limited testing!

I don't know if I will update the tool further and it is provided AS IS without warranty or support.  Feel free to update it yourself if needed.  I started a logging section but ran out of time so just commented out what I had.

 Get MMScheduler.zip

Comments (26)
  1. MedeBay says:

    I was able to set up the web page and add it to the SCOm console – works great!!

    Only issue I have is when trying to list computers in maintenance mode. Only the computers that were put in maint mode using the web page show up, none of the computers that were already in maint mode are listed.

    Is this expected?

  2. steverac says:

    That is not intended – but I can’t say I tested it either.  I would expect the web page to pick up all systems in maintenance mode.  Maybe the ones put in maintenance mode from the console were not placed in ‘full’ maintenance mode?

  3. steverac says:

    A number of readers have downloaded this tool and have found it very useful.  I have received some feedback regarding a couple of configuration items that are required but weren’t documented.  The first is membership in the IIS_WPG group and the second is to make sure .NET framework 3.5 is installed.  Hope this helps!

  4. azee says:

    This is an awesome tool.  However, when I go in to schedule a recurring job for daily, weekly or monthly and select an expiration date it gives me an error message, "A schedule was selected to recur either daily, weekly or monthly. When defining a recurring schedule you must specify an end date for the schedule."  Even when an end date is selected I still receive this message.  Any suggestions?

  5. steverac says:

    Thanks for the feedback and glad you find it useful.  As for the scheduling problem – I seem to remember running across that during testing and it boiled down to needing to pick the right end date in order for the script to validate the entry.  

  6. azee says:

    Thank you for your reply.  Even after I select a date that falls after today’s date, I am still getting the same error message.  If I schedule once for a later time that same day it works fine, but If I select Daily, Weekly, or Monthly and even if I select a date after today’s current date, it gives me the same error message.

    Any help you can provide will be greatly appreciated.

  7. steverac says:

    OK, this is a bug in the error checking code.  Open default.aspx in notepad and find the following line…

           If MMFrequency.SelectedValue = "DAILY" Or MMFrequency.SelectedValue = "WEEKLY" Or MMFrequency.SelectedValue = "MONTHLY" Then

    In the section that follows there are two items that need to be updated

    Find the first if statement that reads

        If Len(MMExpDate) < 10 Then

    Replace that line with

        If Len(Session("MMExpDate") < 10 Then

    Also, in the else section replace

        Session("MMExpDate") = Left(MMExpDate, 10)


        Session("MMExpdate") = Left(Session("MMExpDate"), 10)

  8. azee says:

    Thank you so much!  I really appreciate your assistance with this.  We had some administrators that want to schedule downtime and now it is possible through this tool.  

    Thanks once again.

  9. bogmancometh says:

    I’m following the instructions but new to IIS 7. I did the find replaces in the default.aspx. In IIS 7

    1. I right clicked default web site added virtual directory for mmscheduler and added permissions.

    2. Right clicked application pool "add application pool" put in name and it defaults to .net 2.0.50727 and managed pipeline integrated. With option to start pool immediately.

    _______This is where I get lost________

    Next instructions say right click MMScheduler website and select properties.

    – On the virtual directory tab selec scripts and executables

    – Select MMScheduler for application pool

    – ect… ect… more instructions

    In IIS 7 I can’t find the properties for the MMSScheduler web site to do this? I clicked the virtual folder created earlier in step one and thought it might be in Handler Mappings but I get an error in web.config line number 110 Error: Configuration section not allowed to be set below application.

    Just need some guidance on this section of the instructions above. Thanks, Can’t wait to try the tool.

  10. steverac says:

    OK, I haven’t tested this web page with IIS 7 nor do I think I’ll have time to anytime soon. But, all of the configurations I list in the install doc can easily be made on IIS 7…

    -Enabling scripts and executables

        In IIS 7 select the web ite and go to

        ‘Handler Mappings’.  Select ‘Edit Feature

        Permissions’ to enable what you need.

    -Configuring application pool for website

        -Add a new App Pool using Integrated (if

        that doesn’t work, try classic)

        -Uder Application Pools, click

        DefaultAppPool and then click ‘view


        -Right click on MMScheduler web site and

        select ‘Change Application Pool’ to the

        one you want.

    -Documents tab and Default.aspx

        Click the website and select ‘default

        documents’ and move default.aspx to the


    -Directory Security

        -click the website and select


    Hope this works!

  11. m_speksnijder says:


    I tested this tool, works great. I do have 1 issue, when I try to close the website with the "Exit MM" button, I get a loginbox.

    I do run the tool at port 8080, perhaps this can cause the issue?



  12. ccastell says:

    I am having trouble configuring this, i am a bit green to all this. I am getting a service unavailable mention when i follow the steps outlined in the doc.  Also how do i know what i should but for the sql connection string. my db server name is ***sc02.  do i just add the server name after Data source=?

  13. ccastell says:

    Group maintenance mode does not work right for me.  this is what i am getting

    Microsoft (R) Windows Script Host Version 5.6

    Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

    powershell "d:mmschedulergroupmm.ps1" -groupName:’Vison Server Group’ -hours:1 -rmsServerName:’localhost’ -startMM:$true

    but the group never goes into maintenance mode and the schedule task doesn’t get created.  However single computer maintenance mode works fine.

    any help?

  14. Chris Morgan says:

    Steve ,

    Installed the MMScheduler on MS (Not RMS Server)  After selecting agent to place in MM and time to be in MM I get the following when I click go . ** I noticed the SDK service is not running on the MS only on the RMS . Is there a way to identify RMS in the code so I can run this remotely or do I have to run this on an RMS server so it can call SDK locally .

    Connecting to SDK

    Connection failed. The sdk service is either not running or not yet initialized.

    Could not connect to net.tcp://localhost:5724/SdkDataAccess. The connection attempt lasted for a time span of 00:00:01.0000128. TCP error code 10061: No connection could be made because the target machine actively refused it

  15. steverac says:

    I never tested this other than on the RMS – but it should work without issue on the RMS.  Can be accessed from a web browser runnng anywhere.

  16. Mike Bay says:

    Thanks for the great tool. However, I am still not able to get the Group Maintenence mode to function. It returns a successful response in the tool, but the servers never get placed into Maintenence mode. Any additional information you can provide would be greatly appreciated.

  17. New B says:

    Great idea here Steve! I’ve got this set up and running on my RMS.

    I’m having a little trouble getting it to work right for me.

    When I try to schedule a group, they go into MM immediately. In fact, it prints "GroupName is about to be placed in maintenance mode – continue?" as soon as I press the "Schedule" button.

    Also, how do I clear the list of agents in MM when they are taken out of MM manually?


  18. Derick says:


    This seems to be an amazing tool.  However I can not seem to get it to work correctly.  When I go to schedule maint mode now and click yes I get the following error.

    Connecting to SDK

    Connection failed. The user NT AUTHORITYNETWORK SERVICE does not have sufficient permission to perform the operation.

    Any assistance you can give me on resolving this would be greatly appreciated.

    thank you

  19. steverac says:

    The credentials you are usin are not sufficient.  Looks like network service is being used – you need to specify an account with appropriate rights in IIS.  See the word doc I post in my zip that describes how to configure IIS.

  20. Vince Polenchar says:

    I just recently came across this post and tried to setup the webpage but receive Service Unavailable when I try to browse the page.  I followed exact instructions.  

  21. Maekee says:


    We also have the problem with group maintenance mode. Anyone know where i can find the solution?

    Would also be nice to have an updated instruction how to install MMScheduler in IIS7.


  22. Michael Skov says:

    Hi Steve

    Awesome tool. A couple of questions though:

    How do i change the code so i dont have to put in the domain name after the server name?

    Is there any way to put the server in maintenance in a specific period of time? I have some servers restarting automatically at 03.00, so i would be nice if i could place the servers in mm from 02.50 – 03.20 for instance.

    Thanks in advance


  23. Maekee says:

    I moved my OpsDB yesterday and today the MMScheduler dont work.

    Any thougts


    "Server Error in '/MMScheduler' Application.


    Cannot open database "OperationsManager" requested by the login. The login failed.

    Login failed for user 'Domainsvc_msaa'. (msaa = Management Server Acction Account)

  24. Trazbyte says:

    I am running mmscheduler on an RMS server with Windows 2008 R2 & IIS. When I try to schedule a system for Maint Mode I am getting no scheduled tasks.

    Also, when I try to put a single system into MM I get the following error.

    Connecting to SDK

    Connection failed. Configuration system failed to initialize

    An error occurred loading a configuration file: Access is denied.

  25. Hiren says:

    getting error while using this webpage

    Could not connect to net.tcp://localhost:5724/SdkDataAccess. The connection attempt lasted for a time span of 00:00:01.0000128. TCP error code 10061: No connection could be made because the target machine actively refused it

    any help would be highly appreciated


Comments are closed.

Skip to main content