Monday, January 5, 2015

Connecting to SCOM 2012 using powershell

Use the below snippet to connect to your OpsMgr powershell using Windows Powershell ISE.
There after you can use the cmdlets present in SCOM 2012 freely

## Common script for connecting to SCOM 2012 Management Server
$reg = Get-Item "HKLM:\SOFTWARE\Microsoft\Microsoft Operations Manager\3.0\Agent Management Groups\SCOM2012PROD\Parent Health Services"
$RMS = $reg.GetValue("NetworkName")
Import-Module -Name OperationsManager
New-SCmanagementGroupConnection $RMS | Out-Null
Write-Host $RMS -foregroundcolor Red
########################################################################################

Wednesday, October 15, 2014

In organizations where you have multiple management groups. And have production environments which need SCOM to be working all the time. Its advisable to have two action accounts in the SCOM environment. When one account's password is near expiry you can switch to another account and change your healthservice to run from that account.
Its a big task to rotate the action accounts on all management groups and this is where my script comes handy. It helps change the default action account on SCOM 2012 and also changes the Data Warehouse Report Deployment Account. The script files are below.
Change the extension to .ps1 after downloading. The usage is given at the top of the scripts.

Om12ActionAccountRotate

Om12ActionAccountpasswordUpdate

Monday, September 29, 2014

Increase SQL server performance by using WIFI(Windows Instant File Initialization)

This is an interesting post I came across by Saleem Hakani. I have not tested it yet.
It promises to reduce the time for
Creating a database
Expand data files for additional growth
Automatic data file growth due to auto-grow settings
Restoring a database, etc.
http://sqlcommunity.com/SQL-ARTICLES/Post/1514/SQL-Server-File-Operations-on-Steroid"