Collect deployment diagnostics into a named ZIP, upload it to an authenticated SMB share, and retain the local copy if delivery fails. The archive includes a source manifest; the dedicated CMTrace log records collection and upload results.
Current version: 1.0.0. This README follows main; downloads are versioned snapshots.
Documentation | Quick start | Deployment | Compatibility | Security | Troubleshooting
Standalone script: public gist snapshot. Keep its license and checksum files with the script; see distribution.
- An active ConfigMgr Task Sequence running as Local System with Windows PowerShell 5.1. PowerShell 7 is not a supported runtime.
- WinPE PowerShell/.NET components when collecting in WinPE, plus writable local storage for staging and the ZIP.
- An existing UNC destination, DNS/TCP 445 connectivity, and a dedicated account with the required share and NTFS permissions.
- SMB3, integrity, encryption, and per-connection NTLM blocking by default. Older clients and some WinPE images need explicitly approved compatibility settings; there is no automatic security downgrade.
- Download and verify the release ZIP and SHA-256 sidecar. Use its extracted
Scriptsfolder as the ConfigMgr package source, then distribute the package. It contains the self-containedCopy-OSDLogToFileShare.ps1. - Immediately before the script step, set
OSDLogFileShareto your UNC folder,OSDLogUserNameto the dedicated account, andOSDLogPasswordto its hidden password. - In Run PowerShell Script, set Script name to
Copy-OSDLogToFileShare.ps1. Leave Run as another account disabled and the Parameters field empty for the standard profile. - Set an external step timeout. Save the script result, clear credential variables on success and failure, then propagate the saved failure. Follow the credential lifecycle rather than treating Continue on error as success.
Add -IncludeExtendedLogs only when setup, servicing, update, or rollback diagnostics are needed. Do not pass credentials as script parameters or enable parameter logging.
| Output | Location or meaning |
|---|---|
| ZIP | <Computer>-<Timestamp>-<GUID>.zip in the configured UNC folder |
| Manifest | _Meta/Manifest.json inside the ZIP; lists collected, missing, and failed sources |
| Operational log | CopyOSDLogs.log in _SMSTSLogPath, falling back to %WINDIR%\Temp |
| Retained work | Windows\Temp\PendingOSDLogs on the selected Windows volume after upload failure |
Exit 0 / 1 |
Verified remote byte size and completed local cleanup / a collection, archive, upload, or cleanup failure |
Remote verification compares byte size, not a content hash. Optional source failures remain visible in the manifest and do not alone fail delivery. Previous retained runs are never automatically retried or pruned. See log paths, archive contents, and exit codes before setting retention policy.
- Architecture
- Compatibility
- Deployment
- Development
- Distribution
- Examples
- Logging
- Release process
- Troubleshooting
- Validation
The v1.0.0 automated checks cover Windows PowerShell 5.1 parsing, PSScriptAnalyzer, Pester, version/tag agreement, and exact-byte SHA-256 coverage. Filesystem and ZIP tests use real local files; ConfigMgr and network interactions are mocked.
Live ConfigMgr, WinPE, and SMB validation remains pending. Run the environment rollout checklist before broad deployment. Check CI for the status of a specific revision.
Claudio Mendes · @vartaxe · vartaxe@outlook.com
See authors and artwork notices.
- Add Computer to AD Group - companion task-sequence utility (documentation).
- Claudio Mendes / vartaxe - profile and project directory (GitHub).
MIT. See LICENSE.