Local patch evidence collector - review candidate Tiago Carvalho | https://www.tiagoscarvalho.com Purpose Capture a before/after record on the approved Windows pilot. This is a local read-only evidence helper, not a patch deployment or CVE detection engine. It changes no update settings, installs nothing, performs no network requests, and does not restart the computer. It writes a new local report folder and a DISM query log. Never reuse an existing report directory. Run Windows PowerShell 5.1 as administrator on the pilot to allow the DISM package query. Read the script first. The author line is not an Authenticode digital signature; follow your organization's script execution policy. Save the file, open its containing folder and adapt ExpectedComputer to the approved device name. The collector refuses to run on a different computer. Example (adapt the expected name and output directory): ./Get-LocalPatchEvidence.ps1 -ExpectedComputer 'TSC-147' -Phase Before -OutputDirectory './Evidence/Before-01' ./Get-LocalPatchEvidence.ps1 -ExpectedComputer 'TSC-147' -Phase After -OutputDirectory './Evidence/After-01' Outputs patch-evidence.json: time, device, Windows version, collection coverage and selected restart indicators. PARTIAL means at least one query failed. hotfixes.csv: only produced when Get-HotFix returns records. servicing-packages.csv: only produced when DISM returns package records. dism-query.log: local DISM diagnostics, which may contain local system paths. Interpretation The Phase parameter labels a capture; After is not a pass result. A successful collection does not prove that a CVE is fixed. Get-HotFix is not an exhaustive inventory of every update. Match the installed package/file evidence to the vendor advisory and recheck the SAME device/CVE in a fresh Defender assessment. Supersedence, Hotpatch and separate component updates require additional review. No restart indicator is a guarantee that no restart is required. The original Before state cannot be recreated by running the collector later. Defender timing Microsoft documents a typical 24-48 hour window after remediation is complete and the device reports updated software/version data. Last-seen alone does not prove that the vulnerability inventory has refreshed. If the finding persists, check telemetry, applicability and detection evidence before repeating a change. https://learn.microsoft.com/en-us/defender-vulnerability-management/tvm-weaknesses#cve-detection-logic Checklist Use the AppliesTo column. A direct Intune device restart does not require a new update policy or deployment group. Mark those checks Not applicable when unused. Keep the outputs private. Do not commit reports, device names or DISM logs to a public repository. The sample checklist is blank and is not tenant evidence. Validation status The full After collection ran on TSC-147 through Windows PowerShell on 18 November 2026 at 14:46:52 UTC. All four sections completed: 9 hotfix rows, 212 servicing-package rows and zero incomplete sections. The returned JSON, CSV files and DISM log were checked independently. The selected KB5135385 package is Installed; build 26200.9911 and boot 06:46:47 UTC match the earlier manual capture. The script hash matches the downloadable version. The Before evidence is the original manual capture, not a reconstructed collector run. The helper itself does not check Defender. A separate portal check on 19 November at 07:04 UTC found CVE-2026-124226 absent from the same device. Defender then reported Windows 11 26H2 build 26300.9974, a later release/build than this local collection. The final outcome cannot be attributed solely to the earlier KB installation or restart. The original After files remain the unaltered 18 November collection. Parser checks and seven synthetic checks also passed in PowerShell 7.6.9, covering partial results, CSV consistency, the device guard and existing output protection. These supplement the real pilot; they do not establish compatibility with every Windows or PowerShell environment. When comparing exports, account for representation differences: Windows PowerShell serializes some JSON dates and enum values differently from CSV. CSV dates use the device's local format and do not include a time-zone suffix.