SCCM Health Check Script Updated: Version 3.5

I have just updated the SCCM Health Check Script to from version 3.3 to 3.5 Version 3.4 was finished a while back but I never got time to publish it in this blog. I only emailed 3.4 to few people who contacted me from my blog. Now that I’ve updated it again to 3.5, I thought I’ll just publish version 3.5. What’s Changed Since 3.3? Added site system name under ‘site systems with issues’ section Detect site components that are missing heartbeats. Changed function Validate-DNSRecord to use Win32_ComputerSystem.caption rather than DNSHostname to retrieve computer name as DNSHostName is not available

Continue reading

Command Line Parameters for SCOM Command Notification Channel

Few years ago, I wrote the Enhanced SCOM Alert Notification script and I blogged it here. In all the environments that I implemented this script in command notification channel, there were always some random alerts not been processed. Few months ago, I was working on another PowerShell script to be used in command notification channel to update a custom field when alerts are created. While I was testing it, I found it has exactly the same problem, the subscription randomly skips alerts and left them not processed. In the end, I found the cause of the problem: the command line

Continue reading

SCOM: Monitoring an Interactive Process and The Recovery Task

Recently I’m working on a management pack for a series of apps for a business unit of my employer. There is a large number of processes that I need to monitor and they run interactively on the console session. Auto Admin Logon is enabled on these servers, when the server starts up, it automatically logged on using the account configured and the the interactive processes are automatically started. Setting up monitors for these processes is easy. However, I went a step further and created a generic write action module to be used as recovery task that restarts the process interactively

Continue reading

SCOM: Process Performance Collection Rule for Services

Setting up Performance Collection rules for a particular process is pretty straightforward in SCOM. However, the it has it’s limitations. Process performance collections rules are straightforward to setup, as long as there is ONLY ONE instance of the particular process running on the computers that your rule is targeting. Also, each rule can only collect ONE performance counter. The problem with that is, if I need to collect performance counters for a particular service, i.e. Server Service (lanmanserver) or a particular SQL server instance (when there are multiple SQL instances running on the same server) , I will not be

Continue reading

SCOM: Powershell Property Bag Trigger Only Probe VS Windows Script Property Bag Probe

When writing a Probe Action Module to run a trigger only PowerShell script and return property bags, Microsoft.Windows.PowerShellPropertyBagTriggerOnlyProbe module can be used. However, there is no trigger only probe module if you want to run VBScript. Below are 2 examples how to create trigger only probe modules for both PowerShell and VBScript: 1. PowerShell Member Modules: Microsoft.Windows.PowerShellPropertyBagTriggerOnlyProbe Data Types: Input: Trigger Only Output: System.PropertyBag Data 2. VBScript: Member Modules: System.PassThroughProbe Microsoft.Windows.ScriptPropertyBagProbe Data Type: Input: Trigger Only Output: System.PropertyBag Data

Continue reading

Run Batch File for SCOM Monitor’s Recovery Task

This is how I configured recovery task to run a batch file: Actions Module Type: System.CommandExecuter Module Configuration Application Name: C:\Windows\System32\cmd.exe Working Directory: C:\Windows\System32 CommandLine: /c <Path to Batch file> (i.e. /c C:\Apps\DelFile.bat) TimeoutSeconds: <i.e. 60> RequiredOutput: true    

Continue reading

PowerShell Script: Convert To Local Time From UTC

I wrote this function in the script from my previous post “SCOM MP Authoring Example: Generate alerts based on entries from SQL Database (Part 2 of 2)”. It comes handy sometimes so I thought I’ll blog it separately as well. In PowerShell Datetime object, there is a ToUniversalTime() method that converts local time to UTC time. However, there isn’t a native way to convert FROM UTC To local time. So I wrote this function:

Continue reading

SCOM MP Authoring Example: Generate alerts based on entries from SQL Database (Part 2 of 2)

This is the 2nd part of the 2-part series.  Part 1 can be found here. In Part 2, I’ll cover the steps involved to create each module type and the rule in this article. all these objects will be created in SCOM 2007 R2 Authoring Console. You can create a new management pack for this or use an existing one. Firstly, we will need create the probe action and data source modules: Probe Action Module: 1. Under Type Library pane, go to “Probe Actions” under Module Types and click New—>”Composite Probe Action…” 2. Give it a unique identifier such as

Continue reading

SCOM MP Authoring Example: Generate alerts based on entries from SQL Database (Part 1 of 2)

This is probably going to be a bit too long for one single blog post. I’ll separate this topic into 2 articles: Part 1 includes the background and overview of the rule and it’s workflow Part 2 documents all the steps to create all the module types and the rule itself. This article is the first part of the 2-part series. Recently, I’ve been writing a SCOM management pack for a new application that my employer is implementing. This application logs any application related alarms into a SQL express database. One of the requirement for the MP is to catch

Continue reading
%d bloggers like this: