Skill PSADT v4 → Intune Win32
pt1987/claude-code-psadt-skill
Automatiza build, teste e deploy PSADT v4.x → Intune Win32 com pesquisa e validação
Ver no GitHubSkill do Claude Code que automatiza todo o ciclo de vida de empacotamento PSADT v4.x para Intune Win32: desde a coleta de requisitos, pesquisa autônoma de switches de instalação, scaffolding dos scripts de deploy (Install/Uninstall/Repair), testes pré-voo, até geração do .intunewin pronto para upload. Inclui auto-cicatrização de dependências (módulo PSADT, IntuneWinAppUtil) e suporte opcional a WinGet.
Instalação
npx convez-ai pt1987/claude-code-psadt-skill1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.
Métricas
Casos de uso
- Empacotar aplicativos Windows para distribuição via Intune com PSADT
- Gerar e testar scripts de instalação, desinstalação e reparo automaticamente
- Gerenciar ciclo completo de Win32 app deployment sem procedimentos manuais
- Pesquisar e aplicar switches de instalação silenciosa específicos por aplicativo
Veredito

Skill especializada e bem-estruturada para o nicho de empacotamento PSADT/Intune. Automatiza etapas repetitivas e críticas, com validações pré-voo sólidas. Recomendado para equipes que já usam ou planejam adotar PSADT v4.x; setup inicial exigido, mas compensado pelo ganho operacional.
README
A tradução para o português deste README ainda está na fila.
What is this?
This is a Claude Code skill (not a plugin): a reusable instruction package that teaches the agent how to build, package, test, troubleshoot, and deploy a PSADT v4.x Intune Win32 app. You describe the application; the skill runs the whole workflow — intake, web research, scaffolding, customizing all three deployment types (Install / Uninstall / Repair), pre-flight checks, packaging with IntuneWinAppUtil, dossier generation, testing, and rollout.
A skill is a folder with a SKILL.md (YAML frontmatter + Markdown instructions), optionally bundled
with scripts/, references/, and tools/. It loads progressively: the agent sees only the name and
description until a task makes it relevant, then the full body loads on demand.
Features
-
First-run setup — a one-time wizard persists machine config (paths, language, author) so conventions are configured once, in one place.
-
Self-healing prerequisites — auto-installs the PSAppDeployToolkit module from the PowerShell Gallery if missing, and auto-downloads
IntuneWinAppUtil.exe, keeping both current against their official sources. No manual provisioning, no roadblocks. -
Guided intake — asks the blocker questions up front as clickable options, pre-filled with researched defaults (app, latest version, installer type).
-
Autonomous research — checks the installed PSADT version against the latest release and whether commands changed; researches silent install / uninstall / repair switches and known Intune pitfalls.
-
Scaffolding & customizing — runs
New-ADTTemplateand fills all three deployment types (Install, Uninstall, Repair) from the start — acid-tested — so Company-Portal uninstalls actually work. -
Pre-flight checks — encoding/BOM, AST parse, launcher acid-test per deployment type, and a v3 cmdlet scan before anything is packaged.
-
Packaging to
.intunewin— packs with IntuneWinAppUtil to the central output folder and verifies the package (correctSetupFile, size). -
WinGet packaging (opt-in, never the default) — full
PSAppDeployToolkit.WinGetlifecycle when you explicitly choose the WinGet installer type: self-heals the extension module into the package (scripts/Get-WinGetModule.ps1), discovers the Package ID (Find-ADTWinGetPackage), and fills install/uninstall/repair via*-ADTWinGet*(-Scope Machine). The default stays the app's native installer (MSI/EXE/…) — WinGet is used only on explicit request. -
App logo auto-fetch — finds and downloads the real application logo (official vendor source or Wikimedia Commons) as a high-resolution PNG, verifies actual pixel transparency and visually confirms the brand. Never ships the PSADT default
AppIcon.png(the upload script blocks it by hash). -
HTML package report — always generated — every finished package gets a single self-contained report (
Intune-Dossier.html), whether or not it is uploaded to Intune. Built byscripts/New-PsadtReport.ps1from the fixed templatereferences/Report-Template.html(never hand-assembled). It combines the Intune dossier (App Info, return-code map, detection rule, requirements, assignments, and a ready-to-paste Markdown app description for the Company-Portal field) with a technical package report (the three deployment hooks, PSADT cmdlets used, pre-flight + SYSTEM-test results, logo/.intunewinverification). The document is bilingual with a DE/EN toggle (and stays browser-translatable), Fluent-2 styled with a sticky header, embeds the logo as a data URI, and renders the description preview from its Markdown source. -
Guided testing & staged rollout — DEV-VM cycles (silent,
.exelauncher, SYSTEM context via PsExec), an Intune test-group assignment, then pilot → staged production. -
Troubleshooting — decodes Intune error/HRESULT codes (e.g.
0x80070001), maps symptoms to root causes, and triages the right logs (AppWorkload.log, PSADT session log). -
Start Menu only — creates Start Menu entries and removes stray desktop icons; keeps the desktop clean.
-
Automated SYSTEM test loop (opt-in) — before packaging, installs/uninstalls/reinstalls the package as the SYSTEM account (via
Invoke-CommandAs, mirroring the Intune Management Extension), evaluates logs + detection, and auto-fixes until green or a max-iteration cap. Runs locally and needs an elevated session; recommended on a VM/snapshot. -
Direct Intune upload via Microsoft Graph (opt-in) — pushes the
.intunewinstraight to Intune as awin32LobApp(app + logo, no group assignment), self-contained raw Graph, no third-party module. A one-timeNew-PsadtEntraApp.ps1bootstrap signs in via WAM (Windows broker), creates the Entra app, grants + admin-consentsDeviceManagementApps.ReadWrite.All, and stores the credential — a certificate (preferred; no secret at rest, JWT client-assertion auth) or a DPAPI-encrypted client secret. Read-only dry-run → confirm → upload. Fills the full App-information tab; never deletes an older version (new versions coexist, with optional supersedence wiring); never auto-assigns categories/notes/groups. -
Self-update —
scripts/Update-PsadtSkill.ps1checks GitHub for a newer skill version, shows what's new, and updates in place on your confirmation (git pullfor a clone, otherwise a branch-zip overwrite of the tracked files only — yourconfig.json/secret.dpapi/tools/are never touched). Say "update skill", "/update-skill", or "psadt update".
Planned features (GitHub package sync) live in the Roadmap.
Requirements
- Windows with PowerShell 5.1+ / PowerShell 7+
- PSAppDeployToolkit v4.x (the skill installs/updates this automatically from the PowerShell Gallery if missing)
- Microsoft Win32 Content Prep Tool (the skill provisions this automatically)
- For the optional automated SYSTEM test loop: an elevated PowerShell session; the
Invoke-CommandAsmodule is installed automatically from the PowerShell Gallery - For the optional direct Intune upload: an Entra app registration with the Graph application
permission
DeviceManagementApps.ReadWrite.All(admin consent granted) — created for you in one run byscripts/New-PsadtEntraApp.ps1(interactive WAM sign-in as Global Admin / Privileged Role Admin; device code fallback). Certificate or client-secret auth (cert via-UseCertificate -CertThumbprint). Manual portal route:references/app-registration.md. - For the optional WinGet packaging path: nothing extra —
scripts/Get-WinGetModule.ps1auto-downloads thePSAppDeployToolkit.WinGetextension intotools/(and into the package) the first time you choose WinGet.
Installation
Clone into your Claude Code skills directory (the repo root is the skill folder):
git clone https://github.com/pt1987/claude-code-psadt-skill.git ~/.claude/skills/psadt-deploy
On Windows (PowerShell):
git clone https://github.com/pt1987/claude-code-psadt-skill.git "$env:USERPROFILE\.claude\skills\psadt-deploy"
The skill activates automatically when you ask Claude Code to build an Intune package, or when you work
in a folder containing Invoke-AppDeployToolkit.ps1.
First-run setup
On the first run (or when you say "psadt setup"), the skill walks a short wizard and writes a local
config.json:
| Setting | Purpose |
|---|---|
paths.packageRoot / outputRoot | Where packages live and where .intunewin files are written |
paths.intuneWinAppUtil | Content-prep tool location (skill-managed by default) |
language.script / dossier | Script language (EN) vs. dossier language (DE for the Company Portal) |
author.person / company | Stamped into every package's AppScriptAuthor |
config.json and tools/ are machine-local and are never committed.
Project structure
Current (what ships today):
psadt-deploy/
├─ SKILL.md · README.md · CHANGELOG.md · LICENSE
├─ scripts/
│ ├─ Get-PsadtConfig.ps1 config read
│ ├─ Set-PsadtConfig.ps1 config write (+ DPAPI secret)
│ ├─ Get-PsadtModule.ps1 PSADT module (self-heal)
│ ├─ Get-IntuneWinAppUtil.ps1 content-prep tool (self-heal)
│ ├─ Get-WinGetModule.ps1 WinGet extension (opt-in)
│ ├─ Update-PsadtSkill.ps1 self-update from GitHub
│ ├─ Invoke-PsadtSystemTest.ps1 SYSTEM test loop (Phase 5.5)
│ ├─ New-PsadtReport.ps1 HTML package report (Phase 7, always)
│ ├─ New-PsadtEntraApp.ps1 Entra app bootstrap (WAM)
│ ├─ Get-GraphToken.ps1 app-only Graph token (cert/DPAPI)
│ └─ Invoke-IntuneWin32Upload.ps1 direct Intune upload (Phase 7.5)
├─ references/ guide (App. A–H) + Report-Template.html + app-registration.md
├─ tests/ Pester suite for the scripts
├─ tools/ (gitignored) IntuneWinAppUtil.exe + WinGet module
├─ config.json (gitignored) machine-local settings (intune.* block)
└─ secret.dpapi (gitignored) DPAPI client secret (only without cert auth)
Status
The core build/package/test/dossier workflow is in active use, and the direct Intune upload (Phase 7.5)
is implemented and verified against a live tenant. Shipped: first-run setup + config, self-healing
prerequisites (PSADT module + content-prep tool), HTML deliverables, the opt-in SYSTEM test loop, the WAM
Entra-app bootstrap, and the Graph win32LobApp uploader (coexistence-safe) — helper scripts verified via
the Pester suite in tests/.
Roadmap
Planned features, in rough priority order. These are designed/specced and waiting to be built:
- Sync finished packages to a GitHub repo — a setup option (
output.target=local/git/both) to push the per-app artifacts (.intunewin, dossier, detection, logo) to a Git repo instead of (or in addition to) a local folder — versioned and shareable, optionally not kept locally. Will use Git LFS for large.intunewinfiles (GitHub's 100 MB per-file limit).
Have a request? Open an issue.
Contributing
Issues and pull requests are welcome. Keep SKILL.md, references, and docs in English. The only
non-English content is the generated end-user output (Intune dossier and Company-Portal app
description), whose language follows the language.dossier config value — default German, but
configurable per machine.
License
MIT © Patrick Taubert, PHAT Consulting GmbH
Acknowledgements
- PSAppDeployToolkit
- Microsoft Win32 Content Prep Tool
Invoke-CommandAs- README structure inspired by ComposioHQ/awesome-claude-skills
Changelog
Notable changes to the skill, newest first. Append-only — entries are never removed. Also mirrored in CHANGELOG.md.
0.5.2 - 08.06.2026
- HTML package report is now always generated (upload or not) by
scripts/New-PsadtReport.ps1from the fixed templatereferences/Report-Template.html. One self-contained, bilingual (DE/EN toggle) document combining the Intune dossier + a technical package report; Fluent-2 styled, sticky shrink header, logo embedded as a data URI, description preview rendered from its Markdown source. New Pester testtests/New-PsadtReport.Tests.ps1.
0.5.1 - 06.06.2026
- Self-update now decides by commit (git
HEADvsorigin/main, or the GitHub commits-API sha vs a recordedtooling.skillCommit) instead of the CHANGELOG version — no more CDN lag / circular version reads. - README project-structure tree compacted so it renders without horizontal scroll.
0.5.0 - 06.06.2026
- Skill self-update —
scripts/Update-PsadtSkill.ps1checks GitHub for a newer version, shows what's new, and updates in place on confirmation (git pullfor a clone, else branch-zip overwrite of tracked files only;config.json/secret.dpapi/tools/preserved). Triggers: "update skill", "/update-skill", "psadt update".
0.4.0 - 06.06.2026
- WinGet packaging support (strictly opt-in, never the default) + certificate-based auth for the Phase 7.5 upload (no secret at rest) + MSI icon-table logo fallback + device-code first-poll fix. Contributed by @joakim-i (PR #4), reviewed and hardened before merge. See CHANGELOG.md.
0.3.2 - 06.06.2026
- Test-before-upload is now a binding gate: Install + Uninstall must pass the Phase 5.5 SYSTEM test before any Phase 7.5 upload. If it can't be run (no elevation / VM), stop before upload and hand back the command.
0.3.1 - 06.06.2026
Invoke-IntuneWin32Upload.ps1gains-DetectionScriptPath(PowerShell-script detection rule) for EXE / non-MSI installers without a ProductCode (e.g. Vivaldi). Verified live by uploading Vivaldi 8.0.4033.44.- Lesson: a detection script rule accepts only
ruleType,enforceSignatureCheck,runAs32Bit,scriptContent(guide Appendix H.2).
0.3.0 - 06.06.2026
- Direct upload (
scripts/Invoke-IntuneWin32Upload.ps1, Phase 7.5): self-contained raw-Graphwin32LobAppupload (parse.intunewin→ token → probe → idempotency → create/update → content → SAS block-blob upload via HttpClient → commit → activate → categories → supersedence). Read-only dry-run by default;-Executeto write. - WAM Entra-app bootstrap (
scripts/New-PsadtEntraApp.ps1): interactive Windows-broker sign-in (device code fallback), creates the app + admin consent + secret, DPAPI-stored. - App-only token helper (
scripts/Get-GraphToken.ps1). - Coexistence-safe versioning: never deletes an older version; new versions coexist; optional
supersedence wiring. Logo guard: refuses the PSADT default
AppIcon.png. Fills the full App-information tab; never auto-assigns category/notes/groups. - Fixed the Repair
-FilePath→-ProductCodeexample; reference guide gains Appendix H.
0.2.0 - 05.06.2026
- Automated SYSTEM test loop (
scripts/Invoke-PsadtSystemTest.ps1, Phase 5.5): install → uninstall → reinstall the package as the SYSTEM account viaInvoke-CommandAs, with agent-driven auto-fix until green or a max-iteration cap. Opt-in; elevated session required. - Phase 8 now prefers
Invoke-CommandAs -AsSystemfor SYSTEM-context testing (PsExec kept as a fallback).
0.1.0 - 04.06.2026
- Initial release: guided PSADT v4 → Intune Win32 lifecycle (intake, autonomous research, scaffolding, all three deployment types, pre-flight checks, packaging, dossier + logo, guided testing, troubleshooting).
- First-run setup writing a machine-local
config.json(paths, language, author). - Self-healing prerequisites: PSAppDeployToolkit module (PSGallery) and
IntuneWinAppUtil.exe(auto-download + version check). - HTML dossier document with a Markdown app-description block (the Intune description field is Markdown-only).
- English skill + reference guide; MIT licensed.