Maintenance Mode Scheduled Task for Ops Mgr 2007

 

Neale has addressed the challenge of putting groups of agent-managed nodes into maintenance mode via a PowerShell script, which could easily be run as a scheduled task.

Check it out here:

http://systemcenterforum.org/wp-content/uploads/CmdSchedMaint.zip

6 Responses to “Maintenance Mode Scheduled Task for Ops Mgr 2007”

  1. Sean Kerambrun Says:

    Hi,

    Is it possible to put a sub component into maintenance? Not the whole server

    Cheers

    Sean

  2. admin Says:

    You bet. Find how HERE.
    http://systemcenterforum.org/om-2007-scheduling-maintenance-for-an-object/

  3. Raphael Blatter Says:

    I just downloaded the zip-file from the link above and you’re really filling some hole here. However, I’m not really too experienced with scripting and maybe someone can help me with my question. I understand how to schedule the script with a normal scheduling program. However I’d like to have the whole thing in one place, meaning to use the scheduling function of Operations Manager itself (with the goal of course, that I can put it in the firm’s MP and as such it can be exported together with all the corresponding restart tasks I implemented in the RMS).
    I know how to run scheduled scripts (VBS) on agents and this all works fine. However I didn’t manage yet to run the Power Shell-Script on the RMS.
    I’m not sure if I can schedule PS-scripts (I doubt this is the problem) or maybe I’m targeting the wrong entity. As I can’t target the Agent on a Management Server, I tried all different kinds of entities and it didn’t seem to work.
    I’d appreciate any help! Thanks!

  4. William Gregoire Says:

    The scritp works fantastic except if run this from a CMD file.
    It seems that apostrophes and minus signes are not passed correctly.

    How could solve this?

    Thanks for your help!
    WG.

  5. snowland.se » MaintMode on a single class Says:

    [...] The script: systemcenterforum.org/maintenance-mode-scheduled-task-for-ops-mgr-2007/ [...]

  6. Angel Scom Says:

    I run the script with this parameters:
    Powershell.exe .\groupschedmaint.ps1 -rootMS:’rootms.domain.com’ -groupname:’mygroup’ -timelenght:15 -timetype:’minutes’ -cmdreason:’plannedapplicationmaintenance’ -cmdComment:’scheduled Maintenance test’
    And the exit of the command is:
    PathName :
    ManagementGroup : mymg
    ManagementServerName : rootms.domain.com
    Drives :

    OpsMgr 2007 PSSnapin initialized!

    The group mygroup is not in maintenance mode.
    Please review command line parameters.

    help me please!!!
    thanks

Leave a Reply

privacy policy | terms of use | copyright © 2008 pete zerger