Skip to content

Windows AI Application Inventory

directorcia edited this page Nov 30, 2026 · 1 revision

Windows AI Application Inventory

Overview

ai-apps-report.ps1 is a local, read-only PowerShell inventory tool for Windows endpoints. It identifies locally detectable Artificial Intelligence (AI) desktop applications, Microsoft Store packages, running processes, command-line tools, Start Menu and browser web app (PWA) shortcuts, web browser extensions, and code editor extensions across accessible Windows user profiles.

When the scan completes, the script generates a self-contained, interactive, offline HTML report and automatically opens it in the default web browser (unless -NoLaunch is specified).


Key Capabilities

  • Strictly Read-Only & Safe: Installs no software or PowerShell modules, modifies no system settings, mounts no unloaded user registry hives, and never uploads device data.
  • Clear Console Progress: Displays formatted, color-coded 6-stage progress on screen alongside PowerShell Write-Progress status updates and a grouped summary table upon completion.
  • Multi-Source Discovery: Scans Win32/MSI uninstall keys, Appx/MSIX Store packages, active processes, common portable folders, PATH executables, Start Menu .lnk shortcuts (including installed browser PWAs), 16 browser variants, and 5 code editor extension roots.
  • Extension Enabled/Disabled State: Reads Chromium (Secure Preferences / Preferences) and Firefox-family (extensions.json) profile metadata to report whether discovered browser extensions are actively enabled or disabled.
  • Layered, Updatable Catalog: Uses a built-in offline catalog merged with an optional local JSON file (ai-apps-catalog.json) and an opt-in HTTPS update switch (-UpdateCatalog).
  • Interactive Offline HTML Report: Includes summary metric cards, instant search, evidence-type and match-confidence filters, sortable columns, a light/dark theme toggle, print/PDF styling, and one-click CSV or JSON export of visible rows.
  • Optional Elevation Support: Runs cleanly as a standard user and provides copy-paste elevation instructions—or an explicit -Elevate UAC switch—when full cross-profile and all-user Store visibility is needed.

Prerequisites

Requirement Details
Operating System Windows 10, Windows 11, or Windows Server
PowerShell Version Windows PowerShell 5.1 or PowerShell 7+
External Modules None required
Network Access None required (unless -UpdateCatalog is explicitly specified)
Permissions Standard user supported; Administrator optional (recommended on multi-user devices for other-user profile folders and -AllUsers Store package inventory)

Quick Start & Examples

1. Standard Interactive Run

Scans accessible sources, writes AI-apps-<timestamp>.html in the current folder, and opens the report in your default browser:

.\ai-apps-report.ps1

2. Request Administrator Elevation (UAC Prompt)

Launches an elevated PowerShell window via Windows UAC for broader multi-user and Microsoft Store package visibility:

.\ai-apps-report.ps1 -Elevate

3. Update the AI Product Catalog from GitHub Before Scanning

Downloads the latest ai-apps-catalog.json over HTTPS, caches it locally next to the script when writable, and runs the scan (falls back cleanly if offline):

.\ai-apps-report.ps1 -UpdateCatalog

4. Unattended / RMM / Intune Execution (Custom Output Path, No Browser Launch)

Saves the report to a specific path without launching a browser window:

.\ai-apps-report.ps1 -OutputPath 'C:\Reports\AI-inventory.html' -NoLaunch

5. Use a Custom Organization Catalog & Capture Pipeline Output

Merges your organization's custom catalog JSON and returns a structured PowerShell summary object via -PassThru:

$summary = .\ai-apps-report.ps1 -CatalogPath 'C:\Config\custom-ai-catalog.json' -NoLaunch -PassThru
$summary.Findings | Format-Table Name, Kind, Version, User, Confidence

Parameters

Parameter Type Default Description
-OutputPath string .\AI-apps-<yyyyMMdd-HHmmss>.html Destination file path for the generated HTML report. Must end in .html or .htm. Parent directories are created automatically if missing.
-NoLaunch switch $false Saves the HTML report without opening it in the default browser. Ideal for unattended scripts, RMM tools, or server environments.
-Elevate switch $false Requests Windows Administrator elevation (RunAs) before scanning. If the current session is already elevated, scanning proceeds directly. If UAC consent is declined, the script reports the failure without running an incomplete scan.
-CatalogPath string $PSScriptRoot\ai-apps-catalog.json Path to a local JSON catalog file. Automatically loaded when present and merged with the built-in catalog.
-UpdateCatalog switch $false Downloads the latest JSON catalog from -CatalogUri over HTTPS before scanning, caches it to -CatalogPath when writable, and falls back to local/built-in rules if unreachable.
-CatalogUri string https://raw.githubusercontent.com/directorcia/Office365/master/ai-apps-catalog.json HTTPS URL used by -UpdateCatalog to retrieve the latest catalog JSON. Non-HTTPS URLs are rejected.
-PassThru switch $false Emits a structured [pscustomobject] summary (including ReportPath, counts, catalog metadata, and Findings) to the PowerShell pipeline.

What Gets Scanned (The 6 Stages)

During execution, ai-apps-report.ps1 enumerates Windows user profiles from HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList (plus the active $env:USERPROFILE) and runs six numbered stages:

Stage [1/6] — Installed Applications & Store Packages

  • Machine Uninstall Registry: HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall and WOW6432Node.
  • Current User Uninstall Registry: HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall and WOW6432Node.
  • Other Loaded User Hives: Inspects HKEY_USERS\<SID>\Software\... for other currently logged-in users. Unloaded NTUSER.DAT hives are not mounted; a coverage warning is logged instead.
  • Microsoft Store / MSIX Packages: Runs Get-AppxPackage -AllUsers when elevated, or Get-AppxPackage for the current user when unelevated.
  • Inspects DisplayName, registry key identifier, Publisher, and Comments.

Stage [2/6] — Running Processes

  • Captures a point-in-time snapshot via Get-Process.
  • Evaluates process names along with executable Path, FileDescription, and FileVersion when accessible.

Stage [3/6] — Common Portable & Per-User Application Locations + CLI Tools

  • Checks top-level folders and .exe files in:
    • ProgramFiles, ProgramFiles(x86), ProgramData
    • Per-profile AppData\Local\Programs, AppData\Local, Applications, Desktop, and Downloads
  • Checks PATH via Get-Command for known AI CLI binaries (defaulting to ollama, aider, claude, codex, gemini, gpt4all, lmstudio, goose, open-webui, llama-cli, koboldcpp, plus any tools added via ai-apps-catalog.json).

Stage [4/6] — Start Menu & Browser Web App (PWA) Shortcuts

  • Recursively inspects .lnk files under the Common Start Menu (%ProgramData%\Microsoft\Windows\Start Menu\Programs) and each accessible user's Start Menu (%APPDATA%\Microsoft\Windows\Start Menu\Programs).
  • Identifies standalone AI shortcuts (Application shortcut) as well as installed browser Progressive Web Apps (Browser web app shortcut) launched via --app-id=... or --app=....

Stage [5/6] — Browser Extensions

Scans all profile folders (Default, Profile 1, etc.) across 16 browser variants:

  • Chromium-based: Google Chrome (Stable, Beta, Canary), Microsoft Edge (Stable, Beta, Dev, Canary), Brave, Arc, Perplexity Comet, Vivaldi, Chromium, Opera, and Opera GX.
  • Firefox-based: Mozilla Firefox and Zen Browser (both unpacked extension directories and compressed .xpi archives in memory without disk extraction).
  • Localization Resolution: Resolves __MSG_...__ placeholders from _locales\<locale>\messages.json (preserving case-distinct keys in both PowerShell 5.1 and PowerShell 7, with automatic English locale fallbacks).
  • Enabled / Disabled State: Reads Secure Preferences / Preferences (Chromium) and extensions.json (Firefox/Zen) to determine whether each extension is Enabled or Disabled.

Stage [6/6] — Code Editor Extensions

Scans extension package.json manifests across accessible user profiles in:

  • .vscode\extensions (Visual Studio Code)
  • .vscode-insiders\extensions (VS Code Insiders)
  • .cursor\extensions (Cursor)
  • .windsurf\extensions (Windsurf)
  • .trae\extensions (Trae)

How AI Detection & the Catalog Work

All matching is performed locally in Get-AiMatch using a two-tier model so results distinguish high-confidence product matches from broader keyword heuristics:

  1. Known AI-capable product (Curated Catalog Match):
    • Matches an item's Name or Identifier (e.g., Appx package ID or publisher.extension ID) against regex rules in the catalog (ChatGPT, OpenAI Codex, Claude, Microsoft / GitHub Copilot, Google Gemini, xAI Grok, DeepSeek, Mistral / Le Chat, Ollama, LM Studio, Cursor, Windsurf / Codeium, Grammarly, Perplexity, NotebookLM, ComfyUI, etc.).
    • Regex rules use word boundaries and anchors (such as ^jan(?:\.exe)?$ and ^cursor(?:\.exe)?$) to avoid false positives on everyday words.
  2. Possible AI product (Keyword Heuristic Fallback):
    • If no catalog entry matches, the combined Name + Description / Publisher / Comments is tested against keywordPattern (matching terms such as artificial intelligence, generative ai, chatgpt, openai, anthropic, large language model, llm, gpt-3/gpt-4/gpt-5, ai assistant, ai-powered, ai agent, powered by ai).
    • The exact matched phrase is recorded in the Evidence column for human review.

Updating or Customizing ai-apps-catalog.json

The catalog loads in three layers (highest priority first), always merging with the built-in baseline so existing rules are preserved:

  1. Online Refresh (only when -UpdateCatalog is used): Downloads JSON from -CatalogUri over HTTPS and caches it to -CatalogPath.
  2. Local Sidecar JSON (ai-apps-catalog.json or -CatalogPath): Loaded automatically if present next to ai-apps-report.ps1.
  3. Built-in Offline Baseline: Embedded inside ai-apps-report.ps1 for single-file and air-gapped deployments.

Example custom catalog file:

{
  "version": "2026.12.01-corp",
  "updated": "2026-12-01",
  "products": [
    { "product": "Contoso Internal Assistant", "pattern": "\\bcontoso[- ]ai\\b" },
    { "product": "Acme Legal LLM", "pattern": "^acme\\.legal-llm$" }
  ],
  "cliTools": [
    "contoso-ai-cli"
  ]
}

Invalid regex entries in a custom JSON file are safely skipped and surfaced under Scan warnings without aborting the inventory.


Administrator Privileges & Elevation Options

Administrator rights are optional. When run as a standard user:

  • All current-user applications, processes, shortcuts, browser extensions, and editor extensions are scanned normally.
  • A warning is recorded under Permissions noting that other users' profile directories and all-user Store packages may be inaccessible.
  • Both the console output and the HTML report include ready-to-run commands for two elevation workflows:
    • Option A: Re-run with -Elevate to trigger a Windows UAC prompt automatically.
    • Option B: Open PowerShell via Run as administrator and paste the exact command provided by the script (which writes a separate AI-apps-admin-<timestamp>.html file in the same output directory and preserves flags like -NoLaunch and -CatalogPath).

Understanding the HTML Report & Pipeline Output

Interactive HTML Report Features

  • Summary Cards: Displays total Evidence records, Known AI-capable matches, Possible matches, Distinct matched names, Coverage warnings, and Scan duration.
  • Filtering & Sorting: Filter live by free-text Search, Evidence type, and Match type, or click/press Enter on any column header (Name, Type, Version, User, Source / profile, Match type, Evidence, State, ID, Location) to sort ascending/descending.
  • Exports & Theme: Export currently filtered rows to CSV (UTF-8 BOM, formula-injection safe) or JSON, switch between Light / Dark themes, or Print / save PDF.
  • Scan Warnings & Source Coverage: Lists every inspected registry key, folder, and profile alongside Scanned, Partial, or Partial / failed status so gaps are transparent.

-PassThru Output Object

When -PassThru is supplied, the script returns a [pscustomobject] with:

  • ReportPath (string)
  • EvidenceCount (int)
  • DistinctNameCount (int)
  • WarningCount (int)
  • CatalogVersion (string)
  • CatalogSource (string)
  • Findings (object[] of individual evidence records)

Scope, Limitations & Privacy

  • Evidence Records vs. Unique App Count: A single product (such as Copilot or ChatGPT) may legitimately appear multiple times—for example, as an installed package, a running process, a Start Menu shortcut, and a browser or VS Code extension. Compare Evidence records with Distinct matched names.
  • Presence vs. Active Usage: Detecting an installed application, CLI binary, or extension manifest does not prove a user actively uses AI features, holds a paid subscription, or sends corporate data to that service.
  • Out of Scope: Purely browser-visited websites without local extensions or PWA shortcuts, browser history/bookmarks, custom non-standard portable paths, external/sideloaded browser extensions outside standard profile folders, WSL distributions, Docker containers, Python virtual environments (pip/conda packages), and AI features embedded silently inside general-purpose software without AI naming/metadata.
  • Data Sensitivity: The generated HTML report contains the computer name, local usernames, and file/registry paths, but collects no credentials, browser history, prompts, messages, or document contents. Store and share generated reports according to your organization's security policies.

Clone this wiki locally