Friday, January 20, 2012

How to change the SCCM Client Log files size to Max value that you want

Sometimes or other we might need to retain the max size of log files for reading/analyzing.

Here are some useful info………… in this regards………….

Client side reference registry

For X86 systems

-          HKLM\Software\Microsoft\CCM\Logging\@GLOBAL

For X64 systems

-          HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\CCM\Logging\@GLOBAL

 

The reference key is Log Maxsize

I tried to change manually by regedit how it is showing error as can’t be edited the value..

So I depended on below WMI script

' VBScript to change the Log File Size on a ConfigMgr client

' Change the 500000 to your required size in bytes

 

Dim newLogMaxSize

Dim sMachine

newLogMaxSize = 500000

sMachine = "."

set oCCMNamespace = GetObject("winmgmts://" & sMachine & "/root/ccm")

Set oInstance = oCCMNamespace.Get("SMS_Client")

set oParams = oInstance.Methods_("SetGlobalLoggingConfiguration").inParameters.SpawnInstance_()

oParams.LogMaxSize = newLogMaxSize

oCCMNamespace.ExecMethod "SMS_Client", "SetGlobalLoggingConfiguration", oParams

' End of script

 

So Do not change the registry value directly!

 

The SDK shows the SetGlobalLoggingConfiguration Method in Class SMS_Client

 

http://msdn.microsoft.com/en-us/library/cc146025.aspx

No comments:

Post a Comment