Releases: jasonulbright/general-scripts
v1.0.9
Added
CodeQuality/
Find-EmptyCatchBlocks.ps1— AST-based finder for emptycatch {}blocks across.ps1/.psm1files. 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 existingRemove-AppRegistryEntries.ps1cleanup 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-NamePatternfilter. 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-KeepInstalledPatternregex 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
.ps1files (Filesystem/ConvertTo-Icon.ps1plus the 6 new MECM helpers). House rule: no non-ASCII dashes in scripts.
v1.0.8
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, plusdsregcmd /statusEntra state Registry.polsignature check (PRegv1 magic header) for Machine and User scope — catches local-GPO corruption that silently breaksgpupdate- 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=1excluded - 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_*.logfrom%TEMP%(only readable as the running user)
Log parsing:
- Configurable time window (
-HoursBack, default 24) - Reads both
.logand rolled.lo_companion, merged and deduped FileShare.ReadWrite | Deleteso it coexists withCcmExec— 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 (
-NoLaunchto suppress) - All dynamic content HTML-encoded; no JS, no external resources — the
.htmlcan be attached to a ticket or emailed as-is
Writes to C:\temp\<user>_<host>_<yyyyMMdd-HHmmss>.html.
v1.0.7
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
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
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 wipepost-setup.ps1— runs as SYSTEM via SetupComplete.cmd: imports certs, applies domain join, installs apps in priority order with reboot-resumeunattend-template.xml— skips OOBE, sets computer name, 24H2 BypassNRO workaroundReset-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
Housekeeping: gitignore project-manifest.json
v1.0.3
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) OSDAppProfilevariable for role-based application installs- Hostname sanitization: uppercase, alphanumeric, 8 chars, paste/IME stripping
Get-CimInstance(replaces deprecatedGet-WmiObject) for MECM duplicate checkExport-MECMCredential.ps1included (self-contained)- README and CHANGELOG added
v1.0.2
Added
- rename-extensions.ps1:
-Archiveswitch that creates a.zipof 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.ps1creates the CI, Baseline, and optional deployment via ConfigurationManager cmdlets- Configurable threshold (default 20 GB), weekly schedule
v1.0.1
Added
- CHANGELOG.md