readme-en.txt

SccmOfflineUpgrade PowerShell Module
 
Version: 1.0.7
Author: Arksoft Bilisim
Scope: Full module README for all cmdlets (Install / Export / Download / Import)
Target: Offline (air-gapped) SCCM/ConfigMgr environments
 
Description
 
This module automates the Prepare → Connect → Import offline upgrade workflow for SCCM:
 
Prepare (Export) on the offline site: generate UsageData.cab with ServiceConnectionTool and package it.
 
Connect (Download) on an internet-connected machine: upload usage data to Microsoft, download in-console update payloads, optionally include ODBC 18.
 
Import on the offline site: import downloaded updates into SCCM; optionally run prereq check and (best-effort) trigger upgrade.
 
Optionally install/configure the Service Connection Point (SCP) role and ensure correct Offline mode.
 
Default Paths Used in Examples
 
Offline workspace: C:\Offline
 
ServiceConnectionTool: E:\ConfigMgr\cd.latest\SMSSETUP\TOOLS\ServiceConnectionTool
 
SiteCode: ARK
 
SiteServer (FQDN): arksccm.arksoft.local
 
Cmdlets Overview
 
Install-SccmServiceConnectionPoint
 
Purpose: Install the Service Connection Point role and/or set its mode (Offline or Online).
Why: ServiceConnectionTool requires SCP to be Offline in air-gapped scenarios.
 
Parameters
 
-SiteCode <String> (Required): SCCM Site Code (e.g., ARK).
 
-SiteSystemServerName <String> (Required): Site system server FQDN to host SCP (e.g., arksccm.arksoft.local).
 
-Mode <String>: Offline or Online. Default: Offline.
 
-LogPath <String>: Log file path. Default: C:\ProgramData\SccmOfflineUpgrade\logs\Install-SCP.log
 
-RestartCoreServices [Switch]: If present, restarts SMS_EXECUTIVE and SMS_SITE_COMPONENT_MANAGER and verifies SCP mode via WMI. (Recommended)
 
Notes
 
After changing mode, restart core services so the change is effective; otherwise tools may still “see” the old state.
 
Example
 
Install-SccmServiceConnectionPoint `
  -SiteCode "ARK" `
  -SiteSystemServerName "arksccm.arksoft.local" `
  -Mode Offline `
  -RestartCoreServices `
  -LogPath "C:\Offline\Install-SCP.log" `
  -Verbose
 
 
Export-SccmOfflinePackage
 
Purpose: Run SCT -prepare on the offline site to produce UsageData.cab, then bundle SCT + usage data into a ZIP for transfer to an online machine.
 
Parameters
 
-OutputZip <String> (Required): Output ZIP full path (transfer package).
 
-ServiceConnectionToolPath <String>: Folder or EXE path for SCT.
 
Example folder: E:\ConfigMgr\cd.latest\SMSSETUP\TOOLS\ServiceConnectionTool
 
-StagingRoot <String>: Working root used to stage files before ZIP.
Default: C:\ProgramData\SccmOfflineUpgrade\staging
 
-UsageDataCabName <String>: Name or full path of the usage cab to generate.
 
If file name only (e.g., UsageData.cab), the cab is staged under Transfer\ and included in the ZIP.
 
If full path (e.g., C:\Offline\UsageData.cab), the cab is written there; a copy is also placed under Transfer\ to ensure it’s inside the ZIP.
 
-LogPath <String>: Module log. Default:
C:\ProgramData\SccmOfflineUpgrade\logs\Export-SccmOfflinePackage.log
 
-ExceptionLogDirectory <String>: If set, writes a detailed exception dump to <dir>\exception.log when failures occur.
 
-EnsureOdbc18 [Switch]: Before prepare, check/install Microsoft ODBC Driver 18 for SQL Server (silent). (Offline MSI path required)
 
-OdbcInstallerPath <String>: Full path to msodbcsql18.msi for offline install.
 
Typical Offline Example (Recommended)
 
Export-SccmOfflinePackage `
  -OutputZip "C:\Offline\UsageData.zip" `
  -LogPath "C:\Offline\UsageData.log" `
  -ServiceConnectionToolPath "E:\ConfigMgr\cd.latest\SMSSETUP\TOOLS\ServiceConnectionTool" `
  -StagingRoot "C:\Offline" `
  -UsageDataCabName "UsageData.cab" `
  -ExceptionLogDirectory "C:\Offline" `
  -Verbose
 
 
Notes / Troubleshooting
 
If log shows “Usage data is not yet available”:
 
Ensure SCP is Offline.
 
Restart services:
 
Restart-Service SMS_EXECUTIVE -Force
Restart-Service SMS_SITE_COMPONENT_MANAGER -Force
 
 
Wait a few minutes and retry export.
 
The cmdlet tries multiple SCT prepare variants to cope with SCT parameter differences across builds.
 
Invoke-SccmOnlineDownload
 
Purpose: On an internet-connected machine, extract the offline export ZIP, upload usage data, download all required update payloads, and re-package them into a single ZIP suitable for the offline site.
 
Parameters
 
-InputZip <String> (Required): ZIP produced by Export-SccmOfflinePackage.
 
-DownloadOutput <String> (Required): Folder where SCT places downloaded updates.
 
-OutputZip <String> (Required): Consolidated ZIP to carry back offline.
 
-LogPath <String>: Module log (connect & download). Default:
C:\ProgramData\SccmOfflineUpgrade\logs\Invoke-SccmOnlineDownload.log
 
-ErrorLogPath <String>: Per-file download errors. Default:
C:\ProgramData\SccmOfflineUpgrade\logs\OnlineDownloadErrors.log
 
-Proxy <String>: Optional proxy (e.g., http://user:pass@proxy:8080).
 
-IncludeOdbc18 [Switch]: Include ODBC 18 MSI inside the output ZIP (under Prereqs\ODBC18\).
 
-EnsureOdbc18 [Switch]: Ensure ODBC 18 is installed silently on the online machine before running SCT (downloads installer if needed).
 
(Internal) Progress bar writes percentage to console; per-file completions are logged; no GUI popups on errors.
 
Example (No Proxy)
 
Invoke-SccmOnlineDownload `
  -InputZip "C:\Offline\UsageData.zip" `
  -DownloadOutput "C:\Offline\Download" `
  -OutputZip "C:\Offline\SccmUpdateContent.zip" `
  -LogPath "C:\Offline\Download.log" `
  -ErrorLogPath "C:\Offline\DownloadErrors.log" `
  -IncludeOdbc18 `
  -EnsureOdbc18 `
  -Verbose
 
 
What you’ll see
 
C:\Offline\Download\... → downloaded cab/sha/content (often GBs)
 
C:\Offline\SccmUpdateContent.zip → the portable package for the offline site
 
C:\Offline\DownloadErrors.log → any failed files with reasons (HTTP codes, hash, etc.)
 
Import-SccmOfflineUpdates
 
Purpose: On the offline site, import the downloaded updates into SCCM; optionally run prereq check and best-effort trigger upgrade.
 
Parameters
 
-InputZip <String> (Required): ZIP from Invoke-SccmOnlineDownload.
 
-ServiceConnectionToolPath <String>: SCT folder or EXE path (e.g., E:\ConfigMgr\cd.latest\SMSSETUP\TOOLS\ServiceConnectionTool).
 
-StagingRoot <String> (Alias: -ExtractTo): Where to extract the ZIP.
Default: C:\ProgramData\SccmOfflineUpgrade\import
 
-RunPrereqCheck [Switch]: Runs prereqchk.exe /LOCAL from CD.Latest if found.
 
-CdLatestRoot <String>: If prereq path detection needs help (e.g., E:\ConfigMgr\cd.latest).
 
-TriggerUpgrade [Switch] (Aliases: -TryStartUpgrade, -StartUpgrade): Best-effort WMI call to request “Install Update Pack” for the latest Available package.
 
-SiteCode <String>: Required if -TriggerUpgrade is used (e.g., ARK).
 
-SiteServer <String>: Target site server FQDN (e.g., arksccm.arksoft.local).
 
-LogPath <String>: Module log. Default:
C:\ProgramData\SccmOfflineUpgrade\logs\Import-SccmOfflineUpdates.log
 
Example
 
Import-SccmOfflineUpdates `
  -InputZip "C:\Offline\SccmUpdateContent.zip" `
  -ServiceConnectionToolPath "E:\ConfigMgr\cd.latest\SMSSETUP\TOOLS\ServiceConnectionTool" `
  -StagingRoot "C:\Offline\Import" `
  -RunPrereqCheck `
  -TriggerUpgrade `
  -SiteCode "TST" `
  -SiteServer "sccm.domain.com" `
  -LogPath "C:\Offline\Import.log" `
  -Verbose
 
 
Notes
 
-TriggerUpgrade uses a best-effort WMI request; monitor CMUpdate.log and Updates and Servicing in the console.
 
If ODBC 18 is missing and the package includes an MSI under Prereqs\ODBC18\, the import cmdlet will attempt silent install before SCT -import.
 
Prereq logs: ConfigMgrPrereq.log. Import logs: CMUpdate.log, hman.log, dmpdownloader.log.
 
End-to-End Usage (Menu-less, Manual Calls)
Phase 1 — Offline PREPARE (on site server)
Export-SccmOfflinePackage `
  -OutputZip "C:\Offline\UsageData.zip" `
  -LogPath "C:\Offline\UsageData.log" `
  -ServiceConnectionToolPath "E:\ConfigMgr\cd.latest\SMSSETUP\TOOLS\ServiceConnectionTool" `
  -StagingRoot "C:\Offline" `
  -UsageDataCabName "UsageData.cab" `
  -Verbose
 
Phase 2 — ONLINE DOWNLOAD (on internet-connected machine)
Invoke-SccmOnlineDownload `
  -InputZip "C:\Offline\UsageData.zip" `
  -DownloadOutput "C:\Offline\Download" `
  -OutputZip "C:\Offline\SccmUpdateContent.zip" `
  -LogPath "C:\Offline\Download.log" `
  -ErrorLogPath "C:\Offline\DownloadErrors.log" `
  -IncludeOdbc18 -EnsureOdbc18 `
  -Verbose
 
Phase 3 — Offline IMPORT (on site server)
Import-SccmOfflineUpdates `
  -InputZip "C:\Offline\SccmUpdateContent.zip" `
  -ServiceConnectionToolPath "E:\ConfigMgr\cd.latest\SMSSETUP\TOOLS\ServiceConnectionTool" `
  -StagingRoot "C:\Offline\Import" `
  -RunPrereqCheck `
  -TriggerUpgrade -SiteCode "ARK" -SiteServer "arksccm.arksoft.local" `
  -LogPath "C:\Offline\Import.log" `
  -Verbose
 
Logging & Files Produced
 
Default log root: C:\ProgramData\SccmOfflineUpgrade\logs\
 
Install-SCP.log — SCP role & mode operations
 
Export-SccmOfflinePackage.log — PREPARE & package creation
 
Invoke-SccmOnlineDownload.log — CONNECT & download & packaging
 
OnlineDownloadErrors.log — Per-file download failures
 
Import-SccmOfflineUpdates.log — IMPORT & (optional) prereq & (optional) upgrade
 
ZIP outputs:
 
UsageData.zip — carry to online machine
 
SccmUpdateContent.zip — carry back to offline site
 
Troubleshooting Cheatsheet
 
SCT says “Usage data is not yet available.”
→ Ensure SCP is Offline, then:
 
Restart-Service SMS_EXECUTIVE -Force
Restart-Service SMS_SITE_COMPONENT_MANAGER -Force
 
 
Wait a few minutes; rerun Export-SccmOfflinePackage.
 
Transfer folder empty inside ZIP
→ Use -UsageDataCabName "UsageData.cab" (file name only) or ensure the cmdlet copies the full-path CAB into Transfer\ before zip.
 
ODBC 18 missing
→ Online: use -EnsureOdbc18 (auto download & silent install).
→ Offline: use -EnsureOdbc18 -OdbcInstallerPath <msodbcsql18.msi>.
 
Import shows no update “Available”
→ Check CMUpdate.log, dmpdownloader.log; ensure you imported the latest payload; sometimes status materializes after a short delay.
 
Change Log (Highlights)
 
v1.0.7 (2025-08-18)
 
README consolidated for all cmdlets with full parameters & scenarios.
 
Export: supports full-path -UsageDataCabName and ensures CAB also staged inside ZIP.
 
Export: detailed exception dump via -ExceptionLogDirectory.
 
Download: robust progress (stdout + folder scan), per-file logging, no GUI prompts.
 
Import: -StagingRoot aliasing (-ExtractTo), -TriggerUpgrade aliases, ODBC18 ensure-from-package improvements.
 
v1.0.6 (2025-08-12)
 
DLL digitally signed for integrity & authenticity (security improvement).
 
v1.0.5 (2025-08-12)
 
Import: added -SiteServer and hardened WMI (Impersonation/PacketPrivacy).
 
Guid normalization, clearer warnings when status objects missing.
 
Download: improved ZIP extraction compatibility; better progress.
 
(Older entries: 1.0.4 – ODBC18 options & progress; 1.0.3/2/1 foundational fixes; 1.0.0 initial Prepare→Connect→Import flow.)
 
Support
 
Email: support@arksoft.com.tr
 
Please attach relevant logs from C:\ProgramData\SccmOfflineUpgrade\logs\ when requesting assistance.