Skip to content

Releases: jasonulbright/general-scripts

v1.0.9

20 Apr 12:52

Choose a tag to compare

Added

CodeQuality/

  • Find-EmptyCatchBlocks.ps1 — AST-based finder for empty catch {} blocks across .ps1 / .psm1 files. Useful for auditing error-handling coverage in a module or script tree.
  • Test-ScriptSyntax.ps1 — AST parse-error checker across a path; returns exit code 1 when any script fails to parse. Drop-in pre-commit / CI gate.

DotNet/

  • Get-AssemblyInfo.ps1 — Reflection-based .NET DLL inspector. Enumerates all public types with their declared properties, methods (excluding property accessors), and custom attributes. Useful when decompiling or retargeting a vendored library.

Registry/

  • Search-ARPEntries.ps1 — Read-only ARP search across HKLM Uninstall (x64 + x86) and HKCR Installer\Products. AND-matched wildcards on DisplayName, DisplayVersion, and Publisher. Complements the existing Remove-AppRegistryEntries.ps1 cleanup tool.

MECM/ — bulk-deployment helpers (lab / testing oriented):

  • deploy-allapps.ps1 — Required Install deployment for every CM application against a target collection.
  • deploy-undeployedapps.ps1 — Required Install only for apps that currently have no deployment anywhere. Idempotent gap-filler.
  • distribute-allcontent.ps1 — Distribute content for every CM application to a DP group. Optional -NamePattern filter. Treats "already targeted" as a non-error.
  • remove-allapps.ps1 — Bulk-delete every CM application in the site. Refuses if any application still has a deployment.
  • remove-alldeployments.ps1 — Delete every application deployment across the site (all apps, all collections). Destructive; intended for lab resets.
  • remove-deploymentsbypattern.ps1 — Delete pattern-matched deployments on a target collection without recreating any new deployment. For clearing conflicts mid-test.
  • set-availabledeployment.ps1 — Switch pattern-matched apps from any existing deployment to a Required-less Available deployment on a collection. Built around the M365 ODT / Click-to-Run case.
  • switch-deploymentstouninstall.ps1 — Convert every Install deployment on a collection to an Uninstall deployment, with a -KeepInstalledPattern regex for excluding system dependencies (VC++, WebView2, runtimes).

All MECM bulk helpers target specified collections, never All Systems. Lab testing helpers first; use with care.

Fixed

  • Stripped em-dashes and en-dashes from 7 .ps1 files (Filesystem/ConvertTo-Icon.ps1 plus the 6 new MECM helpers). House rule: no non-ASCII dashes in scripts.

v1.0.8

20 Apr 12:47

Choose a tag to compare

Added

MECM/client-check/ — end-user self-service diagnostic tool for "I can't install this from Software Center" triage.

Generates a single self-contained HTML report and opens it in Edge. Purpose-built for support tickets: the end user runs it before submitting, and the .html attaches to the ticket with everything first-line support needs to start triaging without remoting in.

What it gathers:

  • OS, uptime, system drive free/total (771.4 GB free of 1862.1 GB on drive C:), RAM, make/model/serial
  • Network adapters (up only) with MAC, IPv4, IPv6, gateway, DNS
  • Computer distinguishedName via ADSISearcher, plus dsregcmd /status Entra state
  • Registry.pol signature check (PReg v1 magic header) for Machine and User scope — catches local-GPO corruption that silently breaks gpupdate
  • Pending-reboot state from CBS, Windows Update auto-update, pending file rename operations, and CCM_ClientUtilities.DetermineIfRebootPending
  • Installed applications from all three uninstall hives (HKLM 64-bit, HKLM 32-bit, HKCU), SystemComponent=1 excluded
  • MECM client version, site code, management point, last policy evaluation, last hardware/software inventory, cache size
  • Last 20 errors and warnings in a 24-hour window across 25+ CCM client logs plus the user's SCClient_*.log from %TEMP% (only readable as the running user)

Log parsing:

  • Configurable time window (-HoursBack, default 24)
  • Reads both .log and rolled .lo_ companion, merged and deduped
  • FileShare.ReadWrite | Delete so it coexists with CcmExec — same sharing flags CMTrace uses
  • Sorted newest-first; errors red, warnings amber; "clean in window (N older)" when nothing fresh but file has history

UX:

  • Big red banner at the top when a reboot is pending, amber when uptime exceeds 24 hours, telling the user to reboot before submitting a ticket
  • Launches in Edge (-NoLaunch to suppress)
  • All dynamic content HTML-encoded; no JS, no external resources — the .html can be attached to a ticket or emailed as-is

Writes to C:\temp\<user>_<host>_<yyyyMMdd-HHmmss>.html.

v1.0.7

09 Apr 18:47

Choose a tag to compare

Added

  • Pre-flight checks in Invoke-PrepareReset.ps1: pending reboot (CBS, Windows Update, file rename), AC power (laptops), and disk space (20GB minimum) — blocks reset before any staging work begins

v1.0.6

29 Mar 22:40

Choose a tag to compare

Added

  • HyperV/Watch-VMLog.ps1 -- tail VM logs via PowerShell Direct with color-coded output
  • HyperV/Get-VMLogInventory.ps1 -- discover processes and log files inside a Hyper-V VM
  • Drivers/Remove-DriverStoreEntries.ps1 -- remove stubborn drivers by regex pattern with -WhatIf support
  • Filesystem/ConvertTo-Icon.ps1 -- convert images to multi-size .ico (CLI + drag-and-drop GUI)

v1.0.5

29 Mar 00:07

Choose a tag to compare

Zero-Touch Remote Factory Reset (WinReset v2.0.0)

Remotely factory reset a Windows device with automatic domain rejoin, certificate import, app installation, and MECM client bootstrap. Zero human interaction.

New Scripts

  • Invoke-PrepareReset.ps1 — captures hostname/OU, generates offline domain join blob, stages recovery payload, triggers wipe
  • post-setup.ps1 — runs as SYSTEM via SetupComplete.cmd: imports certs, applies domain join, installs apps in priority order with reboot-resume
  • unattend-template.xml — skips OOBE, sets computer name, 24H2 BypassNRO workaround
  • Reset-Config.json — ordered InstallSequence with support for .exe, .msi, .bat, .cmd, .ps1, .cer, .pfx

Key Features

  • No temporary admin accounts or passwords in unattend.xml
  • Reboot-resume: tracks progress in registry, resumes from next step after reboot
  • User never sees an unsecured desktop (all installs before login screen)
  • Offline domain join (no DC access needed post-reset)
  • 44 Pester tests passing

Also Added

  • Invoke-FactoryReset.ps1 — MDM_RemoteWipe trigger (replaces systemreset in 24H2)
  • OSD-ComputerSetup — WinPE prestart command (no ServiceUI/MDT dependency)

Original factory reset concept from r/SCCM community.

v1.0.4

28 Mar 20:21

Choose a tag to compare

Housekeeping: gitignore project-manifest.json

v1.0.3

28 Mar 16:18

Choose a tag to compare

OSD-ComputerSetup Prestart Rewrite

Rewrote OSD-ComputerSetup as a WinPE prestart command. No ServiceUI.exe or MDT dependency.

Inspired by PSAppDeployToolkit v4.1 which demonstrated that ServiceUI token manipulation is a security risk.

  • Moved to MECM/WinPE/OSD-ComputerSetup/ as a self-contained project
  • Role map externalized to role-map.json (editable without touching the script)
  • OSDAppProfile variable for role-based application installs
  • Hostname sanitization: uppercase, alphanumeric, 8 chars, paste/IME stripping
  • Get-CimInstance (replaces deprecated Get-WmiObject) for MECM duplicate check
  • Export-MECMCredential.ps1 included (self-contained)
  • README and CHANGELOG added

v1.0.2

24 Mar 15:45

Choose a tag to compare

Added

  • rename-extensions.ps1: -Archive switch that creates a .zip of the target folder after renaming extensions. Streamlines the rename-zip-email workflow into a single command.
  • MECM/cachebaseline/: Automated CCM cache cleanup solution using an MECM Configuration Baseline.
    • Discovery script reports non-persistent cache size in MB
    • Remediation script clears non-persistent cache elements (preserves content flagged "Persist in client cache")
    • New-CCMCacheCleanupBaseline.ps1 creates the CI, Baseline, and optional deployment via ConfigurationManager cmdlets
    • Configurable threshold (default 20 GB), weekly schedule

v1.0.1

14 Mar 15:55

Choose a tag to compare

Added

  • CHANGELOG.md

v1.0.0

12 Mar 17:04

Choose a tag to compare