CM 2010 Client Diagnostic - Log Collection not working

David Turner 96 Reputation points

Hi folks,

I am trying to remotely collect client logs to investigate some current issues, but am unable to get the clients to send the logs.

Testing on a working client, I can see the log request arrive and the diagnostic.log but collection fails on the client updates as follows:

Collecting log files ...
PowerShell path: C:\WINDOWS\system32\WindowsPowerShell\v1.0\PowerShell.exe
GetAllCcmLogs: Non-zero exit code. 1.
GetAllCcmLogs: Failed. 0x80004005.

Checking the powershell log in the eventviewer shows the following for the powershell activity:

Error Message = Unexpected error occured while collecting diagnostic information.
Fully Qualified Error ID = Unexpected error occured while collecting diagnostic information.

Severity = Warning
Host Name = ConsoleHost
Host Version = 5.1.18362.1171
Host ID = f144278e-985e-401f-bfde-e8dede0cae7b
Host Application = C:\WINDOWS\system32\WindowsPowerShell\v1.0\PowerShell.exe -NonInteractive -NoProfile -ExecutionPolicy RemoteSigned -File C:\WINDOWS\CCM\datacollector.ps1
Engine Version = 5.1.18362.1171
Runspace ID = 4c7fdb73-4e9c-4d16-a21a-4c00409abbbd
Pipeline ID = 1
Command Name =
Command Type =
Script Name = C:\WINDOWS\CCM\datacollector.ps1
Command Path =
Sequence Number = 15
User = Domain\SYSTEM
Connected User =
Shell ID = Microsoft.PowerShell

User Data:

Any help or assistance appreciated.

Microsoft Configuration Manager
0 comments No comments
{count} votes

Accepted answer
  1. David Turner 96 Reputation points

    We have managed to resolve this issue, the \Windows\CCM\Logs folder was also hosting an additional subfolder for application installation logs ( \Windows\CCM\Logs\Folder which were created for fault finding), it is the presence of this additional folder and content that was causing the issue.

    Once this additional subfolder was removed this functionality worked correctly.

2 additional answers

Sort by: Newest
  1. David Turner 96 Reputation points

    Hi Jason,

    The current policy is not blocking the script from running and CMPivot is fully working, so this is not the current problem.

  2. Jason Sandys 30,931 Reputation points Microsoft Employee

    Exit code 1 with PowerShell can mean multiple things but is often because of the PowerShell execution policy. Thus, is there a domain-based execution policy set to All Signed applied to this system? IF so, then you need to add the certificate used to sign the script to Trusted Publishers. This is [briefly] called out at

    0 comments No comments