scom-agent-initiated-maintenance-mode-with-sccm-maintenance-windows

AdamMohamed-3032 61 Reputation points
2023-06-13T10:45:03.78+00:00

Hello All,

Could someone please help me with below questions ?

I have followed the instruction given in the below Kevin's blog but the servers are not falling into Maintenance mode during SCCM patching.

https://kevinholman.com/2019/07/28/scom-agent-initiated-maintenance-mode-with-sccm-maintenance-windows/

  1. In our Environment we are patching the servers in different time zone and patch will be installed each server local time. Do I have to make the changes in the script ?
    2.After importing the MP will it automatically put the server into maintenance mode or any changes to be done in the MP or SCCM end.
  2. When I execute the script to check the if the server is placing into maintenance. The script is working as expected and got the event it triggered for the specific server but the server is not placed into MM.

Agent Side Maintenance Mode Initiated.
Duration in minutes: (15).
Reason: (PlannedOther).
Comment: (Agent Initiated Maintenance Mode set by (user name) for (15) minutes.).
User: (user name).
Local Time Stamp: (05/14/2023 07:06:21)

Please advise on this.

Thanks,

Adam.

System Center Operations Manager
System Center 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,622 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. XinGuo-MSFT 22,231 Reputation points
    2023-06-14T06:44:10.6333333+00:00

    Hi,

    Based on the information provided, here are the answers to your questions:

    1. If you are patching servers in different time zones and each server is patched based on its local time, then you will need to make changes to the script to reflect the local time of each server. You can modify the script to incorporate timezone information or adjust the timing of the SCCM maintenance windows accordingly.
    2. After importing the management pack, it will not automatically put the server into maintenance mode. You will need to use the provided PowerShell script to initiate maintenance mode for the desired agent-managed computer(s). The script triggers an event on the agent, which is then read by the maintenance mode trigger rule to set the agent in maintenance mode.

    Regarding the issue with the server not being placed in maintenance mode, it could be due to various reasons, such as incorrect permission settings or misconfiguration. You can check the following:

    • Make sure the System Center Operations Manager SDK account has the required SQL Server access and membership in one of the SQL Server roles to take advantage of the maintenance mode feature.
    • Verify that the accounts listed under Operational Database Account profile have SQLAgentOperatorRole permission on the MSDB database. If not, assign the permission to each account under this profile.
    • Check that the specified agent-managed computer is running the System Center Operations Manager agent and is communicating with the management server.
    • Review the maintenance mode trigger rule configuration to ensure it is set up correctly.
    • Query the MaintenanceModeHistory table in the Operations Manager database to get information on when a monitored entity went into maintenance mode, which can help with troubleshooting.

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.