Wednesday, 22 April 2015

SCOM Data access Service and Config Service failing to start after recent SCCM Patching

SCOM Data access Service and Config Service failing to start after recent SCCM Patching

  • After recent SCCM patching window where the SCOM servers got patched, i got a call from support team that the SCOM Data access service (SDK service) and Config Service are not starting.
  • Further investigation revealed that a particular patch KB2677070 was causing the issue as it was trying to access the intenet to check on revoked trusted certificates.
  • As most corporate enviorment internet is blocked from prouction servers this started faining can caused the service not to start.
  • After uninstall the patch and reboot the server, the services started without any issue.
  • Another solution is that you have go to th registry
  • HKLM\Software\Policies\Microsoft\SystemCertificates
  • Right-click AuthRoot, select New, and then click DWORD.
  • Type DisableRootAutoUpdate, and then press Enter.
  • Right-click DisableRootAutoUpdate, and then click Modify.
  • In the Value data box, type 1, and then click OK.

Saturday, 7 March 2015

SCOM 2012 R2 giving error Operations Manager Database Grooming not compelted Succesfully

SCOM 2012 R2 giving error Operations Manager Database Grooming not compelted Succesfully:

 
  • You might get this error in your SCOM console and not sure what to do, lets understand what this alert means and work from there fixing this.
  • So when you get this alert, first go and check your grooming settings to see how old alerts can be in SCOM operatoins Database, default is 7 days.
  • Then create a view to filter alerts more than 7 days in closed state
  • If you see more than 10000 alerts then your grooming is not working.
  • Ok now how to fix it.Lets login to to the Operations Manager Database
  • Open the query Window and run SELECT * FROM interaljobhistory order by interaljobhistoryid DESC.
  • You can see 4 jobs with daily date updated, it will have a 0 or 1 net to it. If its 1 then its success.If its 0 then its failed.
  • Now if the failed are more than1 then open the query windows and the run the Grooming Job manually EXEC p_groomingandPartitioning
  • It will take long time some time close to 8 hours. If it succeeds then run the SELECT * FROM interaljobhistory order by interaljobhistoryid DESC and see if it succeded.
  • If it fails the erro will tell you what the issue is. If its transaction log full error, then take a backup of your transaction logs and then run the above job.
  • If the error is temb db full , then increase the space in temp db and try running the query again.
  • If the error is LOCK error, then stop all the SCOM services on the managment server and then run the query and wait till it successeds.
  • You also try changing the grooming settings .increase the number of days from 7 to 30 for all config in grooming settings and then run the job. If it succeds, the start reducing the days 1 day at a time and keep doing till it reaches optimum level.
  • Another technique is to run just the failed jobs that you seel when you run the select query and see if it succeds. 

Tuesday, 17 February 2015

Scom tutorial to get primary management server

1. Scom is pretty powerful tools to get the management server
2. To get the primary management server use.
3. The powershell command get-primarymangementsever

Tuesday, 20 January 2015

SCOM Agent is not installed but still showing in Pending State in SCOM 2012 r2-Resolved

SCOM Agent is not installed but still showing in Pending State in SCOM 2012 r2-steps to resolve


  • We recently had a issue where there is no SCOM agent on the server.But When we try to Install SCOM agent from Console its says there is already agent pending to be managed and doesn't allow to install.
  • Then when we check the pending agent state it shows up there ,but if i go and check the server there is no SCOM agent.
  • So we where puzzled how its coming in pending management. Then we reject in pending management it goes from there.But if i try to install agent again it comes in pending management.
  • So its stuck in pending management,So this time i rejected it and its gone from there.
  • Then i Ran the Command shell command
               GET-SCOMPendingManagement | where {$_.AgentName -eq "FQDNServername"

  • And the server was showing pending in command shell but not in console.
  • To fix it you need to login to Operations Manager database server and run the below store procedue on query window on the operations manager database
               p_AgentPendingActionDeletebyAgentName 'FQDNServername'

Friday, 16 January 2015

VBSCript to check if file exist and update scom

VBSCript to check if file exist and update scom



Dim oAPI, oBag
Set oAPI = CreateObject("MOM.ScriptAPI")
Set oBag = oAPI.CreatePropertyBag()
Set objFSO = CreateObject("Scripting.FileSystemObject")
strFile = "C:\MYFILE.LOG"
If objFSO.FileExists(strFile) Then
Call oBag.AddValue("Status", "OK")
Else
Call oBag.AddValue("Status", "Error")
Call oAPI.Return(oBag)
End If

Sunday, 4 January 2015

Powershell Script to put Multiple Computers in Maintenance mode in SCOM 2007 R2

Powershell Script to put Multiple Computers in Maintenance mode in SCOM 2007 R2


You can use the below script to add Mutiple Computer in Maintenance mode in SCOM 2007 R2

$comparr= get-content -file "c:\scomscripts\servert.txt"

$starttime = "12/25/2014 22:00" # Change the Starttime
$EndTime = "12/27/2014 23:00"   # Change the Endtime

foreach($Computer in #comparr)

{
$objComputer =Get-agent | where-object {$_.Name -match $computer

$objComputer.HostComputer | New-MaintenaceWindow -StartTime:$starttime -EndTime:$EndTime -Comment" "Server in MM mode"
}

How to get the RUN window in Windows Server 2012 R2

How to get the RUN window in Windows 2012


  • To get the Run Windows in Current version You just click on Start and search for Run and it will show up.
  • To get the Run windows in Windows 2012. Right Click on the Start Button.It will show the Run Program there.Click on it and you will get the Run Windows