convez.ai
SkillDevOps & InfraestruturaIntermediário
pt1987

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 GitHub
BomPluginScore · de 0 a 100

Skill 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-skill

1 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

Estrelas
28
Forks
8
Acompanhando
1
Saúde
42%
Último commit
há 1 mês
Versão
v0.50.0
Issues abertas
0
Contribuidores
2

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-ADTTemplate and 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 (correct SetupFile, size).

  • WinGet packaging (opt-in, never the default) — full PSAppDeployToolkit.WinGet lifecycle 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 by scripts/New-PsadtReport.ps1 from the fixed template references/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/.intunewin verification). 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, .exe launcher, 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 .intunewin straight to Intune as a win32LobApp (app + logo, no group assignment), self-contained raw Graph, no third-party module. A one-time New-PsadtEntraApp.ps1 bootstrap signs in via WAM (Windows broker), creates the Entra app, grants + admin-consents DeviceManagementApps.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.ps1 checks GitHub for a newer skill version, shows what's new, and updates in place on your confirmation (git pull for a clone, otherwise a branch-zip overwrite of the tracked files only — your config.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-CommandAs module 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 by scripts/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.ps1 auto-downloads the PSAppDeployToolkit.WinGet extension into tools/ (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:

SettingPurpose
paths.packageRoot / outputRootWhere packages live and where .intunewin files are written
paths.intuneWinAppUtilContent-prep tool location (skill-managed by default)
language.script / dossierScript language (EN) vs. dossier language (DE for the Company Portal)
author.person / companyStamped 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 .intunewin files (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

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.ps1 from the fixed template references/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 test tests/New-PsadtReport.Tests.ps1.

0.5.1 - 06.06.2026

  • Self-update now decides by commit (git HEAD vs origin/main, or the GitHub commits-API sha vs a recorded tooling.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.ps1 checks GitHub for a newer version, shows what's new, and updates in place on confirmation (git pull for 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.ps1 gains -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-Graph win32LobApp upload (parse .intunewin → token → probe → idempotency → create/update → content → SAS block-blob upload via HttpClient → commit → activate → categories → supersedence). Read-only dry-run by default; -Execute to 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→-ProductCode example; 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 via Invoke-CommandAs, with agent-driven auto-fix until green or a max-iteration cap. Opt-in; elevated session required.
  • Phase 8 now prefers Invoke-CommandAs -AsSystem for 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.
Ver o original no GitHub

Bom para

Relacionados