Fixing issues with ConfigMgr client log collection

In ConfigMgr version 2002 Microsoft introduced the ability to remotely collect client logs using the client notification channel and have them delivered to your Management point. This is very useful as it means you can troubleshoot client issues without disturbing your users.

Assuming that the connection between your Management point and your client(s) is healthy and the request is making it to the client, a new log will appear in C:\Windows\CCM\Logs called Diagnostic.log when the log collection is initiated. A successful log collection will generate three lines in the log:

Collecting log files ...
PowerShell path: C:\WINDOWS\system32\WindowsPowerShell\v1.0\PowerShell.exe
FileCollection: Successfully sent report. Destination:mp:MP_SinvCollFileEndpoint, ID: {F4266B5E-BA06-46B3-91ED-B5C03539043E}, Timeout: 10080 minutes MsgMode: Signed, Not Encrypted

Note that this is when verbose logging disabled.

In a rare case, however, client log collection may not work. One reason may be that the size of the compressed client logs exceeds 100 MB, which is the limit according to Microsoft’s documentation. Another reason, which is not documented anywhere, is that if the full path of any log (including the log name itself) exceeds 116 characters in length, the log collection will fail.

For example, the following would work as the full path is exactly 116 characters:

C:\Windows\CCM\Logs\ApplicationInstallLogs\VeryLongFileNameStoredInTheWindowsCCMLogsDirectory-17_03_2021-Install.log

However, the following log would cause an error as the full path is longer than 116 characters:

C:\Windows\CCM\Logs\ApplicationInstallLogs\VeryLongFileNameStoredInTheWindowsCCMLogsDirectory-17_03_2021-Uninstall.log

If you attempt to collect client logs from a client that has log files that exceed the 116-character path limit, you will see the following errors in Diagnostics.log:

GetAllCcmLogs: Non-zero exit code. 1.
GetAllCcmLogs: Failed. 0x80004005.

This is very unlikely to cause you a problem as none of the ConfigMgr client log files are this long. However, if you capture application install\uninstall logs and decided to put them in the same folder as the ConfigMgr client logs directory, there is a possibility that they will exceed this path length. If this is the case, you will need to choose a new path to store these logs and move them on all your clients.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s