Search This Blog

Thursday, 25 September 2014

Operations Manager 2012 – Useful PowerShell Commands and Scripts


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

Here are some useful PowerShell Commands and Scripts that can help you in your environment.

Note : Change the values in red to the standards of your environment.

Install Prerequisites 2012/2012r2 Management Server and/or Console:

$dwnld = 'C:\File_Download_Location\SCOM2012R2Prereqs'
if (!(Test-Path -path $dwnld))
 {
 New-Item $dwnld -type directory
 }
$object = New-Object Net.WebClient
$RPTurl = 'http://download.microsoft.com/download/F/B/7/FB728406-A1EE-4AB5-9C56-74EB8BDDF2FF/ReportViewer.msi'
$object.DownloadFile($RPTurl, "$dwnld\ReportViewer.msi")
  
$RPTurl = 'http://go.microsoft.com/fwlink/?LinkID=239644&clcid=0x409'
$object.DownloadFile($RPTurl, "$dwnld\SQLSysClrTypes.msi")
  
Start-Process -FilePath "$dwnld\SQLSysClrTypes.msi" -ArgumentList '/q' -Wait
Start-Process -FilePath "$dwnld\ReportViewer.msi" -ArgumentList '/q' -Wait

Monday, 9 June 2014

Creating Dynamic Groups With Windows Computer Objects and Health Service Watcher Objects


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

It has been a well known requirement for most customers, to be able to Create Groups of Windows Computers that also contain corresponding Health Service Watcher objects. This was needed for Alert Notification subscriptions so that different teams could receive alert notifications filtered by groups, but also include alerts from the Watcher, such as Heartbeat failure and Computer Unreachable.

Below you will find the code for SCOM 2007x and SCOM 2012x.

Monday, 19 May 2014

PowerShell & System Center 2012


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

A few days ago Microsoft published a cmdlet reference for System Center 2012, containing many documents about all available PowerShell cmdlets for the System Center 2012 family.

These 37 references can be downloaded from here:

  1. SC2012_AppController_Cmdlets.pdf
  2. SC2012_DPM_Cmdlets.doc
  3. SC2012_DPM_Cmdlets.pdf
  4. SC2012_OpsMgr_Cmdlets.doc
  5. SC2012_OpsMgr_Cmdlets.pdf
  6. SC2012_VMM_Cmdlets.doc
  7. SC2012_VMM_Cmdlets.pdf
  8. SC2012R2_AppController_Cmdlets.doc
  9. SC2012R2_AppController_Cmdlets.pdf

SCOM 2012 R2: FINALLY The Collation Settings Issue Is Addressed!


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

The past
As we all know up to SCOM 2012 R2 the Collation Settings of the SCOM SQL databases was crucial and ONLY SQL_Latin1_General_CP1_CI_AS worked, even though Microsoft stated differently.
Main reason here was that the installer of SCOM installed the Data Warehouse database with this SQL Collation setting (SQL_Latin1_General_CP1_CI_AS) no matter what (SQL) Collation Setting the SQL instance itself was running.

And when there is a mismatch between the (SQL) Collation settings of both SCOM SQL databases (OperationsManager & Data Warehouse) you could end up in situations like these. Only a reinstall would solve that issue OR – when being blessed with really power SQL DBAs – the databases could be preserved while modifying the SQL Collation Settings.

Wednesday, 5 March 2014

Speeding up the SCOM Console


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

Beware! When editing the registry one can cause damage which cannot be undone. So be careful when performing the procedure mentioned in this blogposting. Always make an export of the registry keys before deleting ANYTHING from the registry.

Ok, having said that, there is a nice trick to get the SCOM Console running faster.

At a customers site I bumped into a situation where the SCOM operators complained about the performance of the SCOM Console. And they were right. It was very sluggish. So I checked the RMS and the related SQL server. These servers were performing just fine. No glitch what so ever. They were dimensioned properly (enough cpu, RAM and fast disks) and when running perfmon on those servers, all was well.

So the cause of the sluggish SCOM Consoles wasn't to be found there. Then I turned my attention to the systems of the SCOM Operators. First I found that they were running the SCOM Consoles with the /ClearCache command.

They started with SCOM when it came RTM and with RTM it was advised to use that switch. But when they upgraded to SP1, they were still using this switch. But it is Best Practice only to use this switch when there are problems with the SCOM Console. Under any other circumstances this switch is not to be used. So I deleted this switch.