Missed my session at the Experience days last June? No fear I’ll rerun my session during a live meeting the 20th of September. It will be packed with demos of the new wave of authoring tools which will make your life much easier in maintaining, creating and upgrading your management packs in the SCOM environment.
The abstract of this LiveMeeting:
Do you feel like installing, maintaining and developing management packs feels like a mission? Why not make it a mission! Join me in this session to efficiently tune and create your own management pack with military precision and no room for failure. Get the right tools to arm yourself for the job, get the best approach and fire away. The new secret weapon in Management pack authoring will be revealed and showcased so you can complete every management pack design mission quick and effectively. Attention!
Make sure to sign up here:
https://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032523394&Culture=en-us&community=0
In addition Microsoft BELUX is launching the “Technet Tuesdays and Thursdays”. Two days in the week filled with LiveMeetings + you’ll get 50 MVA (Microsoft Virtual Academy points) when attending.
Check out the full list of LiveMeetings here to receive all the info you need first hand from the experts in the field: http://technet.microsoft.com/nl-be/bb291010/
In my early days of monitoring we had a dedicated computer set up who read out all the critical alerts as for example a server was down. It was a fairly simple setup but had it’s flaws and it was not combined with System Center Operations Manager (which is already a big flaw).
The idea to create a PowerShell script for just doing that was already a significant time on my to do list but kind of made it to the top of my list due to a Facebook request I got last week.
SCOM 2007 (will post the SCOM 2012 version shortly)
*UPDATE* The SCOM 2012 script is now available here: http://gallery.technet.microsoft.com/SCOM-2012-Speak-script-9f24b90c
The pc you want to read out the alert on needs to have:
WinRM needs to be enabled
At least .net framework 3.0 needs to be installed
PowerShell 2.0 needs to be installed
Speakers (pretty obvious no?)
First of all make sure that Computer has PowerShell 2.0 installed.
If this is not the case download and install it here: http://support.microsoft.com/kb/968930
Open PowerShell by browsing to Start > Accessories > Windows Powershell and open Powershell as administrator by right clicking and choosing run as admin:
Next thing on our list is to enable the ability remotely execute commands on the computer.
Run: “Enable-PSRemoting –Force” to enable the WinRM service on the computer.
An alternative way is to use the command WinRM quickconfig in an elevated prompt.
Verify afterwards that the service was started:
Now test from the RMS that the server is reachable through WinRM by running the following command on the RMS:
Test-WsMan COMPUTER (replace COMPUTER with the name of the computer you want the alert to be played on)
The following should appear:
In this example I’m using this script to read out a warning when there’s a server down but you can easily change it to your specific needs of course.
The 2007 script can be downloaded here
The 2012 script can be downloaded here
Copy paste of the script for your reference
#=========================================================================
# AUTHOR: Dieter Wijckmans
# DATE: 07/08/2012
# Name: speak_scom2007.PS1
# Version: 1.0
# COMMENT: Let SCOM read an alert out loud on a remote computer to notify the operator
# CREDITS:
# Usage: .\speak_scom2007.ps1 -$severity -$text -$pc1 -$machine
#
#=========================================================================
###Prepare environment for run###
####
# Start Ops Mgr snapin, get RMS
###
###
#Get parameters from command line, Start Ops Mgr snapin
###
param ([string]$severity,[string]$stext,[string]$pc1,[string]$machine)
#param ([string]$text,[string]$pc1)
##Read out the RMS name
$objCompSys = Get-WmiObject win32_computersystem
$rootMS = $objCompSys.name
#If the RMS is installed on a cluster comment the above 2 lines, uncomment the line below and fill in the server below.
#$rootMS = “Your clustered RMS here”
#Initializing the Ops Mgr 2007 Powershell provider#
Add-PSSnapin “Microsoft.EnterpriseManagement.OperationsManager.Client” -ErrorVariable errSnapin ;
Set-Location “OperationsManagerMonitoring::” -ErrorVariable errSnapin ;
new-managementGroupConnection -ConnectionString:$rootMS -ErrorVariable errSnapin ;
Set-Location $rootMS -ErrorVariable e-severrrSnapin ;
#Set Culture Info# In this case Dutch Belgium
$cultureInfo = [System.Globalization.CultureInfo]’nl-BE’
#Error handling setup
$error.clear()
$erroractionpreference = “SilentlyContinue”
$thisScript = $myInvocation.MyCommand.Path
$scriptRoot = Split-Path(Resolve-Path $thisScript)
$errorLogFile = Join-Path $scriptRoot “error.log”
if (Test-Path $errorLogFile) {Remove-Item $errorLogFile -Force}
#create the text to read. You can change this section to read out a different phrase
#Notice the extra spaces in the string. These are used to slow down the reading and make it more comprehensive
$text = $severity + ” Alert on ” + $machine + ” ” + $stext
#execute script#
invoke-command -computer $pc1 -scriptblock {[Reflection.Assembly]::LoadWithPartialName(“System.Speech”)
$voice = New-Object System.Speech.Synthesis.SpeechSynthesizer
$voice.Speak($args[0]) } -argumentlist $text
###
#Remove the Ops Mgr PSSnapin#
###
Remove-PSSnapin Microsoft.EnterpriseManagement.OperationsManager.Client
You can change the actual change the sentence SCOM is speaking out loud in the highlighted section so let your imagination + creativity go wild on this…
The last thing you have to do to let the computer read out the SCOM alerts is to make a subscription for the alert and pass the desired parameters.
For a full list of all the available parameters I would like to reference to a great post of Kevin Holman: http://blogs.technet.com/b/kevinholman/archive/2007/12/12/adding-custom-information-to-alert-descriptions-and-notifications.aspx
In my particular example I’m using the following parameters: Severity, Machine name, pc1 and text.
Severity: Alert severity
Machine name: machine which is down
Text: Free text you would like to read out loud.
Pc1: The machine where the text needs to be spoken.
: You can send the command to multiple PC’s at the same time by adding a new variable to the command line and C/P the speak section in the script with the name of the new parameter.
The Notification Channel should look like this:
Full Path of the command file: C:\Windows\System32\WindowsPowerShell\V1.0\Powershell.exe
Command Line Parameters:
C:\Scripts\speak_scom2007.ps1 -severity ‘$Data/Context/DataItem/Severity$’ -stext ‘Machine Down’ -pc1 ‘desktop1’ -machine ‘$Data/Context/DataItem/ManagedEntityDisplayName$’
Startup folder for the command line:
C:\scripts
Only thing left to do is link this channel to a subscriber and make an actual subscription for the machine down alerts.
Now just wait until SCOM will start talking to you
Today I received a rather strange error message when I wanted to install a reporting server in an already existing OM 2012 environment.
Symptoms:
The install took ages and was running on “Creating SRS source” forever however it was still running.
After 2 hours it gave an error and rolled back to the original situation.
After going over the prerequisites again it failed again. Rebooted the machine, checked everything again but no dice.
The error message was: Exception Error Code: 0x80131500. The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it is in the Faulted state.
Solution
Turned out that there were proxy settings filled in in Internet Explorer. Apparently the install process is using these proxy settings to connect to the IIS in the background. However my user did not have rights on the proxy. Therefore the connection was denied and the install could not continue. Removing the Proxy settings resolved the issue and Reporting was installed successfully.
Microsoft is continuously developing and improving the System Center 2012 suite. A proof is the recent release CU2.
The majority of fixes are for DPM, Service manager and orchestrator but other minor fixes are also available for SCOM.
For a detailed overview of all the problems this CU2 fixes take a look here: http://support.microsoft.com/kb/2706783/en-us
Download for
DPM: http://www.microsoft.com/en-us/download/details.aspx?id=30413
SCOM: http://www.microsoft.com/en-us/download/details.aspx?id=30421
As more blog posts about installing CU2 emerge I’ll update the list below:
Kevin Greene already wrote a detailed blog post about installing the CU2 update on a SCOM installation: http://kevingreeneitblog.blogspot.be/2012/07/scom-2012-deploying-cumulative-update.html
In this blog post I’m going to show you how you install both consoles on your workstation. I visit a lot of customers lately who have either SCOM2007R2 or SCOM2012 installed. So I recently also installed the SCOM2012 management console on my laptop to have them both on my machine.
By default it’s not possible to install the SCOM2012 console on a workstation which have already SCOM2007R2 installed.
It will propose to upgrade the existing console but unfortunately there’s no option to install side by side.
So first upgrade the SCOM2007R2 console to SCOM2012.
Afterwards you need to reinstall the SCOM2007R2 console:
Select only the “User interfaces” option which is in fact the SCOM console:
So after you’ve installed open up the 2 consoles.
CAUTION: Because you have performed an upgrade the old connection to the SCOM2007R2 management group were still saved. So connect towards your new SCOM2012 management group and you’re all set:
So fill in your new server and hit connect:
Success!
During a recent health check at a customer site I found that the RMS in a SCOM2007 install was in critical state. During my health check this is basically the first thing I check because in SCOM2007 this is still the heart of your environment.
Check of the health explorer revealed the following rather odd message:
The Data Warehouse Database Component Deployment Recovery State – (Data Warehouse Synchronization Server) is in critical error.
First step of my troubleshoot is to check the event log of the RMS server for errors indicating this issue.
The following message was reported which caused this monitor to go to critical state:
Full message:
Event ID: 31565
Description:
Failed to deploy Data Warehouse component. The operation will be retried.Exception ‘DeploymentException’: Failed to perform Data Warehouse component deployment operation: Install; Component: Script, Id: ‘3a49a530-26a2-c525-35fe-69df5898f150’, Management Pack Version-dependent Id: ‘c9942f8c-3e77-e09d-1864-16db528bc3d2’; Target: Database, Server name: “Dbaseserver”, Database name: ‘OperationsManagerDW’. Batch ordinal: 1; Exception: Incorrect syntax near the keyword ‘with’. If this statement is a common table expression or an xmlnamespaces clause, the previous statement must be terminated with a semicolon.
Incorrect syntax near ‘,’.
Incorrect syntax near ‘,’.
Incorrect syntax near ‘,’.
Incorrect syntax near ‘,’.
Incorrect syntax near the keyword ‘ELSE’.
After troubleshooting the issue once more I found out that it happened right after I have implemented the new version of Windows Server Operating System Management Pack (6.0.6972.0) more specific the “Windows Server Operating System Reports” Management Pack which is a part of the management pack.
After carefully investigating I found in the Management pack guide (which can be downloaded here) following statement in the previous version which was not installed yet on the environment (page 8):
“The Microsoft.Windows.Server.Reports Management Pack will only import on systems that use SQL Server 2008 as the Database and is not currently supported on SQL Server 2005.”
As the customer is still on SQL 2005 dbase this was the cause. After removing the management pack from the environment the error disappeared and the RMS came back healthy again.
Lesson Learned here: Always check the management pack history fully and not just the latest changes.
Recently I came across an issue where there was not much info on the web so I thought I would write it on my only sketch book (yep this blog) for my reference and if you have found this post you’ll probably have the same issue so here comes my solution!
Case:
After upgrading SCOM2007R2 CU5 to CU6 level I noticed that my ACS reports were not working anymore.
I’ve checked the server and found out my Audit Collector service wasn’t running anymore on my Collector.
After carefully investigating the event log on my ACS Collector Server I found the following message popping up in the Operations Manager Log:
Event 4618: [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name ‘DescHash’.
Followed by the message that the service was unable to start due to this error and was shutting down.
Hmmm apparently something went seriously wrong during the upgrade in the field of SQL.
Solution
Here’s how I fixed it eventually:
First we need to make sure that we detect the active partition in the ACS Database by running the query below:
Select PartitionId from dbo.dtPartition where status=0
Now running the following statement towards the active partition to add the DescHash to the partition.
Restart the Audit Collection Service on your Audit Collection server and recheck for errors. Normally the Service should keep running and you should see some data coming in if you have already ACS forwarders set up.
Special thanks to Daniele Grandini for pointing this out to me.
Yesterday I launched my SCOM2012 environment in my lab to test some scripts to find the error message below when I started the management console:
No reason or indication is given for the error message. A quick search online showed that it had to do with the fact that my environment was still in eval instead of retail. Which is possible because I installed this version with the RTM bits and updated it to the retail version afterwards.
Consult KB 2699998 for this: http://support.microsoft.com/kb/2699998
So let’s get started.
If your eval is already expired your not able to connect to your management server anymore thus not able to set the new license key you’ll receive the message below when starting the PowerShell session:
The trick is to reset your servers date to a date within your eval period:
Hint: If you are running this machine in a Hyper-v environment make sure to temporarily disable the Time Synchronization integration service to prevent the server from reverting to the time of the Hyper-V host.
So now execute the instructions in the KB again to fill in your System Center 2012 product key (note that since System Center 2012 there are no separate product keys for the different products anymore but there’s 1 general key.
For copy purposes are these the commands to run:
import-module operationsmanager
New-SCOMManagementGroupConnection
Set-SCOMLicense “your licensekey”
To check the status: Get-SCOMManagementGroup | ft skuforlicense, version, timeofexpiration -a
The eval is still in there.
Now reboot your SCOM2012 management server and rerun the last command to double check your timeofexpiration:
Succes
Last but not least: Don’t forget to reset your server clock to the correct time by either resetting it manually or enabling the Time synchronization service of Hyper-V again.
Finally the next generation of authoring tools has arrived to make your authoring life easier and use a combination of the different tools to develop your management packs faster and easier.
Already showcased at MMS and now finally available for download.
Get them here:
Visio Management Pack Designer (VMPD): http://www.microsoft.com/en-us/download/details.aspx?id=30170
Visual Studio Authoring Extensions (VSAE): http://www.microsoft.com/en-us/download/details.aspx?id=30169
Make sure to check out the WIKI’s here:
More to come on this 2 secret weapons in the warfare of creating your management packs.
MMS 2012 is already in the rearview mirror but we are looking back one more time during our traditional “Best of MMS” event on the 7the of June in Mechelen.
This year SCUGBE will again provide you with all the new System Center info received and viewed at the Microsoft Management Summit in Las Vegas.
The list of sessions which are given by scugbe members will be online shortly.
Registration has opened for this event: https://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032513205&Culture=en-US
Reserve your seat quickly as seats are limited.
See you the 7th of June!