SCOM single rule/monitor disable script

Vibin Raj Nadakkal 61 Reputation points
2021-04-26T12:56:20.307+00:00

Hi Team,

Please let me know if any script for single rule/monitor disable for a server.

I have found script to disable or enable rule/monitor bulkily but I need a script to execute single server rule/monitor needs to disable.

Thanks in advance

Regards,
Vibin Raj N

Operations Manager
Operations Manager
A family of System Center products that provide infrastructure monitoring, help ensure the predictable performance and availability of vital applications, and offer comprehensive monitoring for datacenters and cloud, both private and public.
1,601 questions
0 comments No comments
{count} votes

Accepted answer
  1. SChalakov 10,576 Reputation points MVP Volunteer Moderator
    2021-04-27T10:42:41.423+00:00

    Hi @Vibin Raj Nadakkal ,

    if you want to apply obverrides to a broader number of systems, the best way is to create group for them:

    Manage and Create Groups

    and then apply the override to a group:

    Using classes and groups for overrides

    The second link is very, very important as it describers the concept of targeting and overriding in SCOM, which is the most bnnasic thing you need to learn if you work with SCOM.

    Here are a couple of other, very important articles on the topic:

    Best practices for configuring overrides in Operations Manager

    How to create a management pack for overrides

    How to Correctly Create an Override for a SCOM Workflow
    https://monitoringguys.com/2016/05/24/how-to-correctly-create-an-override-for-a-scom-workflow/

    ----------

    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Regards
    Stoyan Chalakov

    1 person found this answer helpful.

2 additional answers

Sort by: Most helpful
  1. SChalakov 10,576 Reputation points MVP Volunteer Moderator
    2021-04-26T14:00:17.39+00:00

    Hi @Vibin Raj Nadakkal ,

    If you insist doing this with a scrupot instead of the GUI, you can use the "Start-SCOMOverride" cmdlet (tool) from the SCOM PowerShell module:

    SCOMHelper PowerShell Module – A SCOM Admin’s Best Friend
    https://monitoringguys.com/2019/11/12/scomhelper/

    or

    just use this script (haven't tested it personally, but look pretty ok):

    POWERSHELL OVERRIDES – NOT ONLY ENABLE/DISABLE
    https://armiev.com/124/

    You can put only one server in the CSV. Please note that your CSV needs to be in the proper format, as depicted in the article:

    > #Load csv file, the file format is Monitor Name,Class Name,Parameter to be changed   
    > #in a monitor you can change the next parameters:  
    > # * Enabled  
    > # * GenerateAlert  
    > # * AutoResolve  
    > # * AlertPriority  
    > # * AlertOnState  
    > # * AlertSeverity  
    

    The class name would of course be the targeted class of the monitor. For example "Windows Computer", "Agent", Windows Server", etc...

    ----------

    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Regards
    Stoyan Chalakov


  2. Crystal-MSFT 53,971 Reputation points Microsoft External Staff
    2021-04-27T01:37:38.32+00:00

    @Vibin Raj Nadakkal , For our request, I have done some research and find some links about bulk disabling monitors or rules for the reference:
    https://effectiveit.wordpress.com/2014/07/26/scom-2012-how-to-bulk-disable-monitorsrulesdiscoveries/
    https://monitoringguys.com/2019/11/12/scomhelper/
    Note: non-Microsoft link, just for the reference.

    Hope it can help.


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.