# Agent Guide: macOS Intune Management Toolkit > This file is written for AI coding agents. It assumes no prior knowledge of the project. Refer to `README.md`, `CHANGELOG_macOS_IntuneToolkit.md`, and `ReleaseNotes.md` for human-facing documentation. ## Project overview This repository is **macOS Intune Management** (also referred to as the IntuneManagement toolkit). It is a cross-platform, headless, PowerShell-first CLI for exporting, importing, migrating, and managing Microsoft Intune policies across tenants. - **Current version:** `4.6.2` (see `VERSION`). - **Primary workflow:** export policies from a source tenant as JSON, optionally capture assignments, then import them into a target tenant with app-only, browser, or device-code authentication. - **Additional capabilities:** declarative baseline deployment from YAML, bulk assignment management, backup/restore of assignments, bulk device operations, policy rename, CSV/Markdown reporting from local backups, and a CIS M365 rapid baseline for tenant-level workloads. - **Important historical note:** the old WPF UI surface has been removed. The repo is intentionally CLI-first and headless. There is no compiled application, no `pyproject.toml`/`package.json`/`Cargo.toml`/`Makefile`, and no CI/CD pipeline. The project is a collection of interpreted PowerShell modules/scripts with supporting Python utilities. ## Technology stack - **PowerShell 7+ (`pwsh`)** — required runtime. Some launcher files declare `#requires -Version 5.1`, but headless scripts and the runtime target PowerShell 7 behaviors. - **Microsoft Graph** — all tenant operations call the Graph `beta` (or optionally `v1.0`) endpoints. - **MSAL.NET** — authentication is handled via `Microsoft.Identity.Client.dll` (shipped in `Bin/`). C# helpers in `CS/` are compiled at runtime with `Add-Type` when proxy or token-cache support is needed. - **Python 3** — optional reporting utilities and CIS PDF conversion (`Scripts/*.py`). A local virtual environment `.venv-pdf` exists for PDF-specific dependencies (`pypdf`, `markdown-it`). - **YAML** — baseline manifests are authored in YAML and consumed by `powershell-yaml`. - **Optional `fzf`** — used by the TUI launchers for interactive menus; falls back to numbered prompts if missing. ### Required / optional dependencies | Dependency | Where used | How to install | |---|---|---| | PowerShell 7+ | Everything | `brew install powershell` / `winget install Microsoft.PowerShell` | | `Microsoft.Graph.Authentication` & `Microsoft.Graph.Applications` | `Initialize-IntuneAuth.ps1` | `Install-Module Microsoft.Graph -Scope CurrentUser -Force` | | `powershell-yaml` | `Deploy-IntuneBaseline.ps1` | Script prompts to install; or `Install-Module powershell-yaml -Scope CurrentUser -Force` | | `fzf` | TUI menus | `brew install fzf`, `apt install fzf`, `winget install junegunn.fzf` | | Python 3 + `pypdf`/`markdown-it` | CIS PDF conversion (`_ConvertFrom-CISPDF.py`) | Recreate `.venv-pdf`: `python3 -m venv .venv-pdf && .venv-pdf/bin/pip install pypdf markdown-it` | ## Architecture and module organization ```text . ├── Start-IntuneToolkit.ps1 # Unified terminal UI launcher (recommended entry point) ├── intune # Bash wrapper: launcher, or `intune