welcome System Center 2007!

System Center Operations manager 2007 in Egypt

قُل لّوْ كَانَ الْبَحْرُ مِدَاداً لّكَلِمَاتِ رَبّي لَنَفِدَ الْبَحْرُ قَبْلَ أَن تَنفَدَ كَلِمَاتُ رَبّي وَلَوْ جِئْنَا بِمِثْلِهِ مَدَداً

Tuesday, July 10, 2007

How to change Agent Maximum Queue Size using a Task

This issue has surfaced in the newsgroups, to solve this issue you can create a task using to change the value in the registry and restart health service on the client
the registry key:
HKLM\SYSTEM\CurrentControlSet\Services\HealthService\Parameters\Management Groups\MG_ Name\MaximumQueueSizeKb

the value : "15 MB" 15360

the script as below:

##############
HKEY_CURRENT_USER = &H80000001
strComputer = "."
Set objReg = GetObject("winmgmts:\\" & strComputer &"\root\default:StdRegProv")
strKeyPath =
"SYSTEM\CurrentControlSet\Services\HealthService\Parameters\Management Groups\MG_ Name"
ValueName = "MaximumQueueSizeKb"
dwValue = 51200
objReg.SetDWORDValue HKEY_CURRENT_USER, strKeyPath, ValueName, dwValue
Set objShell = CreateObject("WScript.Shell")
objShell.Run "%COMSPEC% /c net stop healthservice",,1
objShell.Run "%COMSPEC% /c net start healthservice",,1

###############

2 comments:

Anonymous said...

Hi the default value of 15MB should not be changed without a good reason to do so. Changing the value to be too large or small can cause performance or reliability problems. So take care when planning to use this task and test before deploying

Tarek Ismail said...

i know this due to some customers and admins ask me about how to do this as MOM 2005.

but this value will be changed based on your requirement in production mode.