Logging

Output locations

Output Location
Live CMTrace log _SMSTSLogPath\CopyOSDLogs.log when the folder exists; otherwise %WINDIR%\Temp\CopyOSDLogs.log in the running environment
Local staging Windows\Temp\PendingOSDLogs\<Computer>-<Timestamp>-<GUID>\ on the selected Windows volume
Local ZIP The same pending root, named <Computer>-<Timestamp>-<GUID>.zip
Remote ZIP The existing folder in OSDLogFileShare, using the same ZIP filename

In WinPE, OSDisk selects the offline target when valid. A fallback to the WinPE RAM disk is volatile; retrieve retained work before rebooting. See volume selection.

Archive contents

Each manifest item has Name, Source, Status, and Message. Status is Collected, NotFound, or Error. Collected means the source-copy operation completed; it does not certify that an actively changing source was captured consistently. Other sources continue after a missing or failed optional source.

Exit codes

Code Meaning
0 Archive uploaded, remote byte size matched, connection cleanup completed, and this run’s local staging and ZIP were removed
1 Initialization, required input, archive creation, upload/verification, or cleanup failed

Missing or unreadable optional sources are reported in the manifest and warnings, but do not alone force exit 1. Size equality is not a content hash or proof that every desired log was collected. PowerShell startup/parameter errors or external termination can produce host-specific failures before the script completes. Treat any nonzero step result as failure and preserve it through credential cleanup.

Retention and failure behavior

Apply an explicit local and server retention policy outside this utility. Budget for both staging and compressed data, and verify retained evidence before manually removing it.

Sensitive data

Script-generated failure messages use known safe categories or exception types rather than raw exception text. Explicit supplied credentials are redacted from dedicated log messages. Failure sanitization also applies to manifest error messages; it does not scrub source paths, computer names, copied files, or third-party logs.

Treat all logs and archives as internal diagnostic data. Hide password variables, disable parameter logging, and check both the dedicated log and smsts.log during your pilot. Share only sanitized excerpts, never raw archives in public issues.


Documentation home Deployment Security Troubleshooting Validation