Operations Manager | I do stuff sometimes.

Ramblings about things.

Archives

Linux: Logfiles, timestamps and datematching


I recently came across someting at work that had me bothered for a while. A customer wanted to check some logfiles, where this one specific line is stamped ever so often. If the line is NOT stamped in a timely matter, they wanted to be notified. Seems simple, right? Well, for me it wasn’t that…

Read More

Powershell: Create Event with parameters


This function will let you stamp events to the Windows EventLog, and feed the event with filterable parameterdata (which in the cases you use SCOM to sniff events, is pretty awesome). I use this all the time in cases where a script should dump some kind of result to the eventlog, and using SCOM to…

Read More

Datawarehouse Database Cleanup SQL query


IMPORTANT: Always perform a FULL Backup of the database before doing anything to it !!! This article applies to SCOM 2007, 2012 as well as 2016 (haven’t tested 1807 yet). Somtimes you may have event storms where you end up having old entries in the Data Warehouse database i.e data that is older than the grooming…

Read More

Update: SCOM: October 2016 patch makes your Console crash


Awesome Microsoft, way to go with QA when you make your own core products crash… It seems that the bundled October patch for Windows Server 2008x and 2012x makes the SCOM Console crash when viewing different state views. The patches mentioned: Server 2008 – https://support.microsoft.com/en-us/kb/3192391 Server 2012 – https://support.microsoft.com/en-us/kb/3192392 After uninstalling theese in my environment, the Console…

Read More

SCOM: DeltaSynchronization Error


This error appeared in out environment recently, and didn’t go away until we changed some configuration settings in a config file on all the management servers. Symptoms: EventID 29181 in the OpsMgr eventlog. Newly pushed agents show up as “Not Monitored” Changes you do to a Management Pack, ex. overriding a rule, does not work….

Read More

SCOM: Get Subscriber in Subscription


This little thing will search through, and get all subscribers containing your searchword in any subscription you may have set up in SCOM. param( [String]$searchword ) $sub = Get-SCOMNotificationSubscription | select displayname,torecipients write-host “Searchword: “”$searchword”” exists in the following subscriptions:” foreach ($s in $sub){ $recipient = $s.torecipients.name if ($recipient -like “$searchword”){ write-host “”$s.displayname”” } }…

Read More

SCOM: Get Maintenance Mode History


I use this query whenever I need to investigate Maintenace Mode history for SCOM agents. USE OperationsManagerDW SELECT ManagedEntity.DisplayName, MaintenanceModeHistory.* FROM ManagedEntity WITH (NOLOCK) INNER JOIN MaintenanceMode ON ManagedEntity.ManagedEntityRowId = MaintenanceMode.ManagedEntityRowId INNER JOIN MaintenanceModeHistory ON MaintenanceMode.MaintenanceModeRowId = MaintenanceModeHistory.MaintenanceModeRowId where DisplayName Like ‘%SERVERNAME%’ order by ScheduledEndDateTime – F

Read More

Useful SQL queries for OpsMgr DB


Here are some of the SQL scripts I usually use in case of… whatever. Many of these must be credited to Kevin Holman Set ALL agents to Remotely Managable UPDATE MT_HealthService SET IsManuallyInstalled=0 WHERE IsManuallyInstalled=1 Get Agents not Remotely Managable select bme.DisplayName from MT_HealthService mths INNER JOIN BaseManagedEntity bme on bme.BaseManagedEntityId = mths.BaseManagedEntityId where IsManuallyInstalled…

Read More

SCOM: Command Channel Script


This little script is what I use in cooperation with the SCOM Command Channel to parse and send SCOM alerts to a logfile. The script will take the SCOM alert parameters and put them neatly in a .log file, one file for each alert I want. This, of course, is customizable – I just like…

Read More

Request Template Certificates using CertReq and Powershell


Installing SCOM agents on non-domain servers can be a real time-consuming affair, especially the Create template-request-export-import-certificates procedure. I decided to use my basic certificate and CertReq knowlegde to create this little script that helps me automate the whole thing. NOTE: This is meant for inspiration only. If will for the most part not work in…

Read More

← OLDER POSTS

  • Archives