Feature: Lightweight PowerShell tool for Intune script development
IMPLEMENTATION RULES: Before implementing this plan, read and follow:
- WORKFLOW.md - The implementation process
- PLANS.md - Plan structure and best practices
Status: Completed​
Goal: Create a standalone lightweight PowerShell install script that provides pwsh + PSScriptAnalyzer without the full Azure ops stack.
GitHub Issue: #47
Last Updated: 2026-02-16
Investigation: INVESTIGATE-lightweight-powershell.md — chose Option A (standalone script based on template)
Overview​
Currently PowerShell is only available via install-tool-azure-ops.sh, which bundles Azure CLI, heavy Az/Graph/Exchange modules, and 7 VS Code extensions. For Intune script development, only pwsh, PSScriptAnalyzer, and the VS Code PowerShell extension are needed.
Create install-tool-powershell.sh based on the install template with:
- PowerShell 7 binary (GitHub releases tarball, same as
tool-azure-ops) PSScriptAnalyzermodule (viaPACKAGES_PWSH, handled bycore-install-pwsh.sh)ms-vscode.powershellVS Code extension
Phase 1: Create the install script — ✅ DONE​
Tasks​
- 1.1 Copy
addition-templates/_template-install-script.shto.devcontainer/additions/install-tool-powershell.sh - 1.2 Fill in metadata
- 1.3 Fill in extended metadata
- 1.4 Set packages — only PSScriptAnalyzer
- 1.5 Set VS Code extension
- 1.6 Add version configuration
- 1.7 Implement
install_powershell()function — reused logic frominstall-tool-azure-ops.sh - 1.8 Implement uninstall logic — remove symlinks, installation directory, and modules directory
- 1.9 Implement
process_installations()— callinstall_powershellthenprocess_standard_installations - 1.10 Add
post_installation_message()andpost_uninstallation_message()with relevant quick-start info
Validation​
bash install-tool-powershell.sh --help
# Should show metadata, version, and usage
User confirms phase is complete.
Phase 2: Test and verify — ✅ DONE​
Tasks​
- 2.1 Run
bash -n install-tool-powershell.shto verify syntax — passed - 2.2 Verify
--helpflag works and shows correct metadata — passed (shows ID, name, version, category, packages, extensions) - 2.3 Review script for consistency with
install-tool-azure-ops.shpatterns — consistent
Validation​
Syntax check passes. Help output is correct.
User confirms phase is complete.
Tests Performed​
On macOS host (not inside devcontainer):
bash -n install-tool-powershell.sh— syntax check passedbash install-tool-powershell.sh --help— metadata, version, packages, extensions all displayed correctly- Manual code review comparing
install_powershell()withinstall-tool-azure-ops.sh— identical logic - Verified
process_installations()follows same install/uninstall pattern as azure-ops
Note: Full end-to-end testing (actual PowerShell install, PSScriptAnalyzer module, uninstall) requires running inside the devcontainer (Linux environment with sudo).
Acceptance Criteria​
-
install-tool-powershell.shinstalls PowerShell 7 from GitHub releases - PSScriptAnalyzer module is installed via
PACKAGES_PWSH - VS Code PowerShell extension is included
-
--helpflag works -
--uninstallflag removes PowerShell, modules, and symlinks - Script is idempotent (safe to run twice)
- Does NOT install Azure CLI, Az modules, Graph, or Exchange modules
- Category is
LANGUAGE_DEV -
SCRIPT_RELATEDreferencestool-azure-ops - Follows template patterns (auto-enable, logging, etc.)
Files to Create​
.devcontainer/additions/install-tool-powershell.sh— new install script (based on template)