Skip to content

How to create an Event using Powershell (over event id 1000)

If using EventCreate or other tools, you may face off the event id 1000 limit.
You may use the following powershell to create whatever event id you want (the only limit is the Windows default):
_
$evt=new-object System.Diagnostics.Eventlog(“Application”)
$evt.Source=”TestEventSource”
$evtNumber=6001
$evtDescription=”Test Event Description”
$infoevent=[System.Diagnostics.EventLogEntryType]::Warning
$evt.WriteEntry($evtDescription,$infoevent,$evtNumber)

Enabling SQL BROKER on OperationsManager database takes too long

You should enable broker with the following query command:

Alter Database OperationsManager SET ENABLE_BROKER with Rollback Immediate

To check if broker is enabled, run the following query command:

select name, is_broker_enabled from sys.databases

New! Operations Manager 2007 R2 Management Pack 6.1.7695.0

Changes in This Update

Version 6.1.7695.0 of the Operations Manager Management Pack for Operations Manager 2007 R2 includes the following changes:

  • Added the “Agents by Health State” report which will list all agents, management servers, gateway servers and the root management server grouped by their current health state (i.e. unavailable, error, warning or success). For more information, see Appendix: Reports.
  • Added the “An alert subscription has been automatically disabled due to invalid configuration” rule to generate an alert when an alert subscription is disabled due to invalid configuration, such as when the account that created the subscription being deleted.
  • Added the “WMI Service Availability” aggregate monitor and the “Windows Management Instrumentation Service” unit monitor to monitor the state of the Windows Management Instrumentation (WMI) service (winmgmt) on agents. By default, the unit monitor samples the WMI service every 125 seconds and generates an alert when the WMI service is not running for 3 consecutive samples. These settings can be changed by using overrides.
  • Added rules to that can be enabled in place of monitors that require manual reset of the health state. For more information, see Manual Reset Monitors.
  • Updated product knowledge for some workflows.
  • Changed the “Computer Verification: Verification Error” event collection rule to be disabled by default. The alert from this rule would only be generated when running the discovery wizard, when the user would directly observe that one or more computer verifications failed.  The alert is an unnecessary duplication.
  • Change the “Collect Configuration Parse Error Events” rule to be disabled by default.
  • Changed the parameter used for alert suppression for the following rules:
  • Alert generation was temporarily suspended due to too many alerts
  • Workflow Runtime: Failed to access a Windows event log
  • Workflow Initialization: Failed to initialize access to an event log
  • An error occurred during computer verification from the discovery wizard
  • A generic error occurred during computer verification from the discovery wizard
  • Removed alerting from the “Data Integrity” aggregate monitor and added alerting to its unit monitors:
  • Repeated Event Raised
  • Spoofed Data Check
  • Root Connector Data Validity Check

The Operational Data Reporting Management Pack has not changed in this release.  The version number of the Operational Data Reporting Management Pack was updated to keep the versions the same across all of the management packs in this package.

Can get it from here: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=61365290-3c38-4004-b717-e90bb0f6c148

How to set SCOM Agent Failover for All agents with a specific Primary Management Server (Powershell)

If you want to set SCOM 2007 Failover Management Server for all the agents using a specific Primary Management Server execute:

(Note: change below code for primaryms.server.fqdn and failoverms.server.fqdn according to your environment.)

$PrimaryMS = Get-ManagementServer | where {$_.Name -eq ‘primaryms.server.fqdn’}
$FailoverMS = Get-ManagementServer | Where {$_.Name -eq ‘failoverms.server.fqdn’}

$Agents = Get-Agent | where {$_.PrimaryManagementServerName -eq ‘primaryms.server.fqdn’}
$Agents | sort | foreach {
 $SystemName = $_.Name
 $Agent = Get-Agent | where {$_.Name -eq $SystemName}
 set-ManagementServer -AgentManagedComputer: $Agent -PrimaryManagementServer: $PrimaryMS -FailoverServer: $FailoverMS
}

SCOM 2007 Agent Heartbeat Failures

If you are getting lot’s of heartbeat failure alerts, you should check this out!

First of all: Check all the environment for any configurations not following the best practices.

Note: Problem was detected with DNS 2003 Server monitored by SCOM 2007 R2 Cum.Update 3 Agents. Don’t know if happens with DNS 2008 servers.

There is an issue with DNS MPack 6.0.6480.0, if you are using it, that may be the root cause for Massive heartbeat failure alerts:

  1. Is the “DNS 2003 Component Discovery” enabled? If yes, continue reading this post.
  2. Inspect the top discovery rules that are causing changes. (Query against the OpsDW; see Kevin Holman blog).
  3. Check for a high number of Zone objects (for example in OpsMgr console in the DNS Zone state view).
  4. Inspect the disk I/O on RMS server (Avg. Disk Sec/Write & Avg. Disk Sec/Transfer) and see if it is most of the time near or above 20 ms.
  5. If you are affected disable the “DNS 2003 Component Discovery” Rule.
  6. Wait for the change to take effect (at least 2 hours; but more may be needed).
  7. Allow some time to pass so that you can get conclusions (Recommend one day). Then repeat this analysis from the beginning, and you should see the results.

Performance Tuning Guidelines for Windows Server 2008 R2

Performance Tuning Guidelines for Windows Server 2008 R2

http://www.microsoft.com/whdc/system/sysperf/Perf_tun_srv-R2.mspx

” …

Updated: October 15, 2010

This guide describes important tuning parameters and settings that you can adjust to improve the performance and energy efficiency of the Windows Server 2008 R2 operating system. This guide describes each setting and its potential effect to help you make an informed decision about its relevance to your system, workload, and performance goals.

This paper is for information technology (IT) professionals and system administrators who need to tune the performance of a server that is running Windows Server 2008 R2.

This information applies to the Windows Server 2008 R2 operating system.

…”

Hello world!

Hi all!

It has been some time since when I first thinked about start blogging something usefull to the IT community all over the web.

Have been gratefull for those who are in this “world” for more time, and well… That’s the time!

I’m a full time professional, so I will try to update this blog as long as I have some time to do it.

Hope you enjoy the Posts!