Hi,
The error message you've provided indicates that there is an issue with the execution of a PowerShell script (Demo.SCOM.AgentMaintenanceMode.SCCMServiceWindows.Rule.ps1) associated with a rule for SCOM Agent Initiated Maintenance Mode. Specifically, it appears that the script is encountering a problem when trying to query the SCCM Client via WMI .
Here's a breakdown of the error message and potential steps to resolve it:
Error Message Analysis:
FATAL ERROR: Unable to query to SCCM Client WMI Namespace for the Root\CCM\Sms\Client class: This part of the error suggests that the script is unable to access the SCCM Client WMI namespace. You cannot call a method on a null-valued object: This is a common error in PowerShell, indicating that the script is trying to perform an operation on an object that is null or empty. Troubleshooting Steps:
- Check SCCM Client Status:
Verify that SCCM Clients are installed and functioning correctly on the affected agents. This error suggests that the script cannot access SCCM Client information via WMI.
- WMI Namespace Permissions:
Ensure that the account running the script has the necessary permissions to query the SCCM WMI namespace. Permissions issues can often lead to WMI query failures.
- Check for SCCM Client Errors:
Check the SCCM Client logs (e.g., ccmexec.log) on the affected agents for any errors or issues that might be preventing WMI queries.
- Test Script Manually:
Attempt to run the script manually on an affected agent and see if you encounter the same error. This can help you isolate the problem.