question

DavidTurner-7032 avatar image
0 Votes"
DavidTurner-7032 asked Jason-MSFT commented

CM 2010 Client Diagnostic - Log Collection not working

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.


Context:
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.

mem-cm-general
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

DavidTurner-7032 avatar image
0 Votes"
DavidTurner-7032 answered Jason-MSFT commented

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.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Please send feedback using the console so this can be placed into our backlog for review.

0 Votes 0 ·
Jason-MSFT avatar image
0 Votes"
Jason-MSFT answered

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 https://docs.microsoft.com/en-us/mem/configmgr/core/servers/manage/cmpivot#prerequisites.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

DavidTurner-7032 avatar image
0 Votes"
DavidTurner-7032 answered Jason-MSFT commented

Hi Jason,

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

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

If you're sure of that, then you'll need to open a support case here as there may be some other unexpected issue that will require deeper troubleshooting.

0 Votes 0 ·