Collect deployment logs
Copy OSD Logs to File Share collects a focused set of deployment logs, writes a manifest, creates a local ZIP, and uploads it to an authenticated SMB destination. Failed uploads retain the local archive; successful uploads verify remote byte size, not a content hash.
Current version: 1.0.0. This site follows
main; the v1.0.0 release is a versioned snapshot with its own release notes.
Before deployment
Live ConfigMgr, WinPE, and SMB testing was not executed. Complete the environment-validation checklist before broad deployment.
- Read the deployment guide for package setup, variables, retry limits, and an external Task Sequence timeout.
- Check compatibility before approving exceptions. The secure default requires SMB3, integrity, and encryption, and refuses unverifiable connections.
- Follow the security requirements: hide passwords, disable parameter logging, and use native cleanup steps on success and failure while preserving the script result.
Run only in an active ConfigMgr Task Sequence as Local System with Windows PowerShell 5.1. PowerShell 7 is not a supported Task Sequence runtime. WinPE requires the appropriate PowerShell/.NET components and may need explicitly approved SMB compatibility settings.
Documentation
| Guide | Use it for |
|---|---|
| Deployment | Task Sequence layout, variables, parameters, and credential lifecycle |
| Compatibility | Supported runtime targets and opt-in SMB exceptions |
| Security | Least privilege, credential limitations, private reporting |
| Validation | Reproducible static/mocked checks and pending live scenarios |
| Architecture | Collection, manifest, ZIP, upload, and cleanup sequence |
| Logging | CMTrace diagnostics, retained archives, and sensitive source logs |
| Troubleshooting | Upload failures, timeouts, WinPE storage, and checksums |
| Examples | Placeholder Task Sequence configuration |
| Release process | Source-byte checksums and publication safeguards |
| Development | Workstation setup, names versus paths, and shared banner generation |
| Distribution | Release packages, standalone gist, licensing, and checksum verification |
Outputs and results
Exit 0 means the remote byte size was verified and local cleanup completed.
Exit 1 means collection, archiving, upload, or cleanup failed. Optional source
failures are recorded in the manifest without necessarily failing delivery.
Previous retained runs are not automatically retried or pruned.
See the exit-code contract.
Source and releases
Use the source repository for the maintained script, tests, and contribution guidance. The PowerShell source is also available directly; download the complete package when following the deployment guide.
For the standalone script, use the public gist snapshot with its MIT license and checksums. The repository remains authoritative; see distribution before using a separately downloaded script.
Download the versioned ZIP and matching SHA-256 sidecar from GitHub Releases. Existing downloads do not update automatically.
For changes, see contributing and the release process. Maintained by Claudio Mendes (@vartaxe), under the MIT license.
Related projects
- Add Computer to AD Group - companion task-sequence utility (documentation).
- vartaxe Windows endpoint automation - canonical project hub and maintainer profile (GitHub).