Tuesday, December 16, 2014

Increase the size of Lync Server Log

A large customer of mine asked how the size of Lync Server Log in EventViewer can be increased. The request made sense for them since so many events are registered on single server per hour that tracking past events older than one day is practically impossible.

The first and (easiest) method that comes to mind is GPO. However, in Group Policy we find only the native Application, Security and System logs properties.


We have three options to achieve this task:

1. Do it manually on each server



***The default value is 16MB. In this example, the log size was increased to 80GB (81920KB)

2. Use wevtutil.exe (http://technet.microsoft.com/en-us/library/cc732848.aspx).

wevtutil sl "Lync Server" /ms:83886080

***Note that here we express the desired log size in Bytes (80MB = 83886080 bytes)

3. The last (and preferable) option is… GPO. But wait, GPO does not have this option?!?
We can use New Registry Item with Update option to push the new value to all Lync servers in our environment.



The “Key Path” is SYSTEM\ControlSet001\Services\EventLog\Lync Server and the Value data is our new log size in Bytes.

This is it. Apply the new GPO accordingly and either force gpupdate or leave the servers to do so natively.

One last note: Log file sizes must be a multiple of 64 KB. If you enter a value that is not a multiple of 64 KB, Event Viewer will round he log file size up to a multiple of 64 KB.