Search This Blog

Thursday 23 May 2013

Close SCOM Alerts Older Than Five Days


As of 01/05/2017, this blog will not be updated or maintained

In this post I will share on of my PowerShell scripts to close all SCOM alerts that is open for 5 days or more.

Create a folder were you are going to save the scripts in. In the folder create two empty notepad documents and save them as CloseOldSCOMAlerts.ps1 and CloseOldSCOMAlerts.bat (make sure of the file extensions of the files).

Open the CloseOldSCOMAlerts.bat file and paste the following command in there:

C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe C:\<ScriptFolder>\CloseOldSCOMAlerts.ps1

Monday 20 May 2013

Useful PowerShell Commands


As of 01/05/2017, this blog will not be updated or maintained

In my time of using SCOM 2007 and 2012, I had come across a couple of useful PowerShell commands that helped me a lot. I would like to share these commands with you.


Firstly, lets open the Operations Manager Shell. Once opened you can start using the commands as indicated below. You can always change the path indicated in red.

  • The below command retrieve a list of subscriptions.
Get-NotificationSubscription |%{$c=$_.ToRecipients; $b=@($c|%{$_.Name}); $d=@($c|%{$_.Devices}|%{$_.address});"'{0}' '{1}' '{2}'" -f $_.DisplayName,[string]::join(':',$b),[string]::join(':',$d) }
  • The below command retrieve a list of Management Packs and save it in a *.csv file.

Wednesday 8 May 2013

How To Filter ACS Noise Events From Database


As of 01/05/2017, this blog will not be updated or maintained


In SCOM 2012, the ACS (Audit Collection Services) service is configured to run as 'Network Service' by default. When trying to set a filter, the service tries to update a registry entry:

HKLM\SYSTEM\CurrentControlSet\Services\AdtServer\Parameters
The string that it wants to update is 'DbQueueQuery'.

The permissions to this registry key do not allow 'Set Value'.  You will need to update the permissions on this registry key to allow 'Network Service' the ability to set this registry value.


Delete Decommissioned Servers From SQL That Still Show In The SCOM Console


As of 01/05/2017, this blog will not be updated or maintained

Ever ran into the issue where you delete an Agent from a server but the server is still showing on the SCOM console?

You will need to remove the objects from the Database. This is fairly easy to do. Here are the steps that I use when I have this issue.

System Center Operations Manager 2007 stores all entities it manages in the BaseManagedEntity table in the Operational database (named OperationsManager by default).
This is the place where we will be manually telling SCOM that this computer does not exist any more.

Tuesday 7 May 2013

Greyed Out Domain Controllers in SCOM 2012


As of 01/05/2017, this blog will not be updated or maintained

I had a look at the post on Dave Murphy's blog:

http://scom-2012.blogspot.com/2012/01/grayed-out-domain-controllers-in-scom.html

I still had an issue with SCOM 2012 that Domain Controllers keep on greying out on the console after I have ran the HSLockdown tool on the server. We will look below on how to avoid further greyed out Domain Controllers on the SCOM Console.

When you deploy the Agent from the SCOM console, wait for it to complete with the installation and show up in the Windows Computers state view on the Monitoring tab.