147 Commits
Author SHA1 Message Date
tomas.kracmar ad3b53026c chore(release): 4.6.2 4.6.2 2026-11-24 13:12:55 +01:00
tomas.kracmar cd0d516951 docs: document tenant comparison, bulk scope tags, full export, wrapper and lazy migration
README: intune wrapper, menu overview, batch/sorted export, tenant comparison
section, bulk scope tags, lazy group/filter creation. AGENTS.md: structure,
menu $menuDefs convention, folder picker, SettingOverrides, FullExportRoot.
2026-11-24 13:12:55 +01:00
tomas.kracmar 57917e9183 feat(toolkit): use the folder picker for launcher path prompts
Move the fzf folder browser to Scripts/Private/Select-FolderPath.ps1 so
the launcher can use it too. Full tenant export root, tenant A and B
export folders and the report folder of the offline compare, the
earlier-export choice of the drift check and the report paths now open
the picker. It starts at the nearest existing folder, falls back to a
plain prompt without fzf and understands ~ and quotes.
2026-11-24 13:12:12 +01:00
tomas.kracmar f2f200f904 feat(toolkit): number menu entries automatically
The menu is now a list of entries in display order; the numbers 1-24 are
assigned at startup instead of being hand-picked per item, so adding or
moving an entry never needs renumbering. Dispatch keeps stable internal
ids. README reference to 'delete tenant auth and app registration' is now
item 24.
2026-11-24 13:12:11 +01:00
tomas.kracmar e964813ffe docs: changelog for v4.6.0 (upstream ports, batching, lazy migration, drift, scope tags) 2026-11-24 12:27:17 +01:00
tomas.kracmar d55908e975 feat(bulk): add bulk scope tag tool
Scripts/Bulk-ScopeTags.ps1 (menu item 24) adds, replaces or removes scope
tags across object types, optionally filtered by name, or cleans up tag
ids that no longer exist. Shows the plan per type, supports -WhatIf and
-Force, applies changes with batched PATCH requests and skips objects
whose tag list would not change. Design follows upstream 4.0
Set-GraphBulkScopeTags.
2026-11-24 12:27:17 +01:00
tomas.kracmar df3cda9843 feat(compare): offer a drift check after the full tenant export
After menu item 23 finishes it offers to compare with the newest earlier
export of the same tenant (assignments included) and writes the report to
<root>/_drift/<old>-to-<new>/. Compare-Tenants.py now also accepts a
folder that holds a single export folder (e.g. a dated folder containing
Exports/).
2026-11-24 12:27:16 +01:00
tomas.kracmar 0302286505 feat(import): create only the groups and filters an import references
With Import assignments, migration-table groups are no longer all looked
up or created up front. They are resolved on demand in
Update-JsonForEnvironment, so only groups referenced by imported objects
are created in the target tenant. Assignment filters that exist in the
export but not in the target are created on demand too (needs Replace
dependency ids). Synced source groups log a warning and are created as
cloud groups. New groups get a random 10-character mailNickname like the
Entra portal; group lookup escapes apostrophes in names.
2026-11-24 12:27:16 +01:00
tomas.kracmar 523311700d feat(upstream): port Win32 scripts, quality update policies, sorted JSON
Ported from Micke-K/IntuneManagement 3.10.1.x-3.11.0 (MIT):
- Win32 app install/uninstall scripts are exported (#ScriptInfo plus the
  script files next to the JSON) and recreated on import and copy.
- New object type Quality Updates (Policies)
  (windowsQualityUpdatePolicies); the old type is titled
  "Quality Updates (Profiles)".
- SortJsonProperties setting writes exported JSON with sorted properties
  for stable diffs; always on for headless export.
- EndpointManager.psm1 three-way merged with upstream (page-size flags,
  app fixes). UI-only changes were not taken.
2026-11-24 12:27:16 +01:00
tomas.kracmar 77440ffe36 feat(export): use the Graph batch API by default for headless export
Headless export now fetches objects 20 per $batch call (was one call per
object because UseBatchAPI defaulted to off). -NoBatchApi on
Export-Policies.ps1 / Start-HeadlessIntune.ps1 falls back to single calls.

Adds per-run setting overrides ($global:SettingOverrides, consulted by
Get-SettingValue, set by Invoke-IntuneHeadlessBatch and never persisted).
Verify on a tenant by exporting with and without -NoBatchApi and comparing
the two folders with Compare-Tenants.py.
2026-11-24 12:27:16 +01:00
tomas.kracmar b8e333f92d feat: add intune shell wrapper
./intune starts the launcher without typing pwsh. ./intune <Script> [args]
runs Scripts/<Script>.ps1 or .py. Resolves symlinks so it can be linked
onto PATH; reports a missing pwsh/python3 and lists scripts for an unknown
name.
2026-11-24 12:27:15 +01:00
tomas.kracmar 1733c22c86 feat(toolkit): add full tenant export menu entry
Menu item 23 exports every default object type with assignments for the
current tenant into <root>/<TenantName>-yymmdd (adds -HHmm if the folder
exists). The export root is asked for and remembered in Settings.json
(FullExportRoot, default ~/Local/IntuneExports).
2026-11-24 12:27:15 +01:00
tomas.kracmar 5d8e387288 feat(compare): add offline tenant comparison and launcher menu entry
Scripts/Compare-Tenants.py compares two export folders across all
common categories (settings catalog, device config, compliance,
autopilot, ESP, roles, apps, ...) by flattening objects and ignoring
ids, timestamps, scope tags, OData metadata and names. Policies are
matched by name after stripping per-tenant prefixes (regex), then by
fuzzy name similarity, then by content similarity. Optional assignment
comparison. Writes Markdown and CSV reports.

Start-IntuneToolkit.ps1: new menu item 22 prompts for both exports and
runs the script.
2026-11-24 11:56:43 +01:00
tomas.kracmar 7e1349f1c9 feat(tui): add create-new-folder option to folder browser
Select-FolderPath gets a [Create new folder] entry. It prompts for a
name, validates it, creates the folder inside the current one and
navigates into it.
2026-11-24 11:40:11 +01:00
tomas.kracmar 37ac448d94 feat(roles): export built-in Intune roles; fix ASCII header failure
- Drop the ExpiresOn request header. Under an en-US culture its date
  contains U+202F before AM/PM, so every Graph call failed with
  "Request headers must contain only ASCII characters". Nothing reads it.
- Export all role definitions with their assignments, including built-in
  roles (was custom only via isBuiltIn eq false).
- On import, skip creating built-in roles. When Import assignments is on,
  recreate their assignments against the exported role id (built-in ids
  are identical across tenants). Custom-role behaviour is unchanged.
2026-11-24 11:34:52 +01:00
tomas.kracmarandClaude Sonnet 5 60a655e6d4 refactor(tui): reorder main menu into logical groups
Menu had grown by prepending each new feature to the top, so items
had no relation to their neighbors. Grouped into Export/Import, Bulk
operations, Baselines & compliance, Reporting, Tenant & auth admin,
with Exit last. Item numbers (used for dispatch) unchanged, only
display order moved.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
4.4.1
2026-08-07 18:51:18 +02:00
tomas.kracmarandClaude Sonnet 5 81c5e96fc7 feat(tui): add fzf-based folder browser for export/import path prompts
Read-Host has no tab-completion (that's a top-level PSReadLine feature,
not available to script prompts), so reuse the fzf dependency already
required for menus to browse folders interactively instead: navigate
into subfolders, go up with .., confirm current folder, or type a path
manually. Falls back to plain Read-Host when fzf isn't installed.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-07 11:53:05 +02:00
tomas.kracmarandClaude Sonnet 5 30170a1909 fix(tui): stop re-asking action when launcher already picked Export/Import
Same missing-passthrough bug as the earlier tenant re-prompt fix, this time
for -Action: Start-IntuneManagementTui.ps1 always showed the
Export/Import/DeployCISBaseline/GenerateReports picker even when the
launcher's menu items 1/2 had already decided it. Launcher now passes
-Action through, TUI skips the prompt when supplied.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-07 11:37:35 +02:00
tomas.kracmarandClaude Sonnet 5 ae71f8458d feat(toolkit): add bulk delete tool, fix TUI exit hang and tenant re-prompt
- New Scripts/Bulk-DeletePolicies.ps1: type-DELETE confirmation, -WhatIf dry-run
- Fix infinite loop in Start-IntuneToolkit.ps1 when fzf missing (numbered-menu
  Exit returned "EXIT" but check only matched fzf's "[Exit]" string)
- Start-IntuneManagementTui.ps1 no longer re-prompts for TenantId when the
  launcher already resolved one; also fixes misleading "regex" wording on
  the Name filter prompt (it's a literal substring match)

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-07 11:31:22 +02:00
tomas.kracmarandClaude Sonnet 4.6 2f0d937ca1 fix(ca-exporter): resolve AuthenticationFlows TransferMethods and surface in Excel
Raw object dump replaced with TransferMethods extraction (falls back to
AdditionalProperties for older module versions). Field added to the
Conditions section of Excel detail sheets.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-27 09:53:42 +02:00
tomas.kracmarandClaude Sonnet 4.6 b10258c5b4 fix(ca-exporter): pre-fetch auth context class references to fix ID resolution
Replaced per-policy Graph API calls with a single pre-fetch of all
authentication context class references into a hashtable, consistent
with every other lookup in the script. Also fixes silent ID drops when
DisplayName was missing — GetOrDefault now falls back to the raw ID.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-27 09:49:48 +02:00
tomas.kracmar 6bf7345eb7 release: v4.2.0 — Entra directory role membership export
- Add Scripts/Export-EntraRoleMembership.ps1 to export active + PIM-eligible
  Entra directory role memberships (with group expansion) to CSV.
- Wire the new script into Start-IntuneToolkit.ps1 as menu item 20.
- Document the new script in README.md and AGENTS.md.
- Bump VERSION to 4.2.0 and add CHANGELOG entry.
- Harden .gitignore against local operational artifacts (accounts/ folder,
  deploy.sh, restart_gateways.sh).
4.2.0
2026-07-07 14:57:02 +02:00
tomas.kracmar 90209a7ec4 feat(reporting): expand settings report and add CA documentation
- Export-SettingsReport.py: add coverage for Compliance V2, Endpoint
  Security, Device Management Intents, ADMX, scripts (base64 decoded),
  App Protection/Configuration, updates, enrollment, Autopilot, W365,
  filters, and more; add OMA-URI and customSettings expansion
- Start-IntuneToolkit.ps1: add menu item 19 for Conditional Access
  documentation
- Add Invoke-ConditionalAccessDocumentation.ps1 for CA policy docs
  (CSV/Excel)
- .gitignore: exclude CA documentation CSV/XLSX outputs
- CHANGELOG: document the new reporting capabilities
2026-06-29 15:12:37 +02:00
tomas.kracmar 122aa2d4e3 fix(reporting): add Platform column and clean up Windows artifacts
- Export-SettingsReport.py: add Platform column for Settings Catalog
  (platforms field) and legacy policies (platform/platformType or
  @odata.type inference)
- MSGraph.psm1: store GraphMetaData.xml in cross-platform data folder
  (Get-CloudApiDataFolder) instead of literal %LOCALAPPDATA% path
- MSALAuthentication.psm1: skip TokenCacheHelperEx on non-Windows with
  an info log instead of failing on missing ProtectedData.dll
- .gitignore: remove literal %LOCALAPPDATA% patterns
- AGENTS.md, CHANGELOG: document reporting and cross-platform fixes
2026-06-22 11:56:55 +02:00
tomas.kracmar d3e0769799 release: v4.1.0 — restructure entry points, add CIS baselines, reporting tools and fzf hints
- Restructure launchers: Start-IntuneToolkit.ps1 moves to repo root;
  Start-HeadlessIntune.ps1 moves to Scripts/; TUI helper moves to Scripts/Private/
- Add AGENTS.md with project architecture, entry points, and security notes
- Add CIS M365 baseline assets (CISM365-v7, M365-CIS-Rapid) and reporting scripts
- Add Python reporting utilities (Export-SettingsReport, Export-AssignmentReport,
  Export-ObjectInventoryReport) and CA wizard helpers
- Update Deploy-IntuneBaseline.ps1 with Merge conflict resolution, ReportPath,
  and optimized group loading
- Update Initialize-IntuneAuth.ps1 with -RotateSecret and configurable secret expiry
- Update Extensions for Settings Catalog definition auto-export
- Update README with v4.1.0, new entry points and script catalog
- Bump VERSION to 4.1.0
- Harden .gitignore against .DS_Store, __pycache__, .venv-pdf/, local exports,
  Settings.json and IntuneManagement.log
4.1.0
2026-06-14 15:24:42 +02:00
tomas.kracmar e333af978c Bump version to 4.1.0 v4.1.0 2026-04-16 15:43:34 +02:00
tomas.kracmar 70679cba48 v4.0.1: per-user app naming, auth deletion, TUI onboarding flow, PIM docs v4.0.1 2026-04-16 15:40:33 +02:00
tomas.kracmar 1ff059342f chore: bump VERSION to 4.0.1 4.0.1 2026-04-16 11:36:09 +02:00
tomas.kracmar ab6817f59b feat(ui): detect missing fzf and show installation hints 2026-04-16 11:34:03 +02:00
tomas.kracmar 15210313cd chore: clean ignored cache, refresh README, add VERSION 4.0.0 4.0.0 2026-04-16 11:02:54 +02:00
tomas.kracmar 18fc5190d8 feat(launcher): add 'Refresh tenant names' menu option
- Menu entry 13 re-queries Graph /organization for every saved tenant
- Updates cached TenantName values in Settings.json
- Refreshes the active tenant display in the menu header
2026-04-14 19:51:16 +02:00
tomas.kracmar e8ad3f6b96 feat(launcher): tenant picker with name resolution in TUI
- Start-IntuneToolkit.ps1 now shows a tenant picker as the first step
  when -TenantId is not provided.
- Lists saved tenants from Settings.json, attempting to display cached
  tenant names alongside GUIDs.
- Offers '[+ Onboard new tenant]' option for entering new tenants.
- Automatically resolves unknown tenant names via Graph /organization
  and caches them back to Settings.json for future use.
2026-04-14 19:43:54 +02:00
tomas.kracmar 6703625c00 fix(rename): guard Add prefix against double-prefixing
Skip objects whose displayName or description already starts with
the requested prefix. This makes Add prefix idempotent.
2026-04-14 19:02:06 +02:00
tomas.kracmar cd1c004f4b fix(rename): add retry logic for transient 5xx/429 errors
Settings Catalog and other Graph endpoints occasionally return 500
InternalServerError on PATCH. Retry up to 3 times with a 2s delay
to improve reliability for bulk rename operations.
2026-04-14 18:58:20 +02:00
tomas.kracmar 07c25e897a fix(assignments): use bulk /assign endpoint for removals on all types
Settings Catalog and other bulk-assign types do not support DELETE on
individual assignments. Removal now reloads existing assignments,
filters out selected targets, sanitizes remaining payloads, and
re-POSTs to <API>/<id>/assign. This mirrors the add flow and works
universally across all supported object types.
2026-04-14 18:50:02 +02:00
tomas.kracmar 814c1d116c fix(tui): remove space:toggle binding from fzf to allow searching with spaces
--bind=space:toggle prevented typing spaces in search queries.
fzf --multi already supports Tab for selection by default.
2026-04-14 18:44:54 +02:00
tomas.kracmar 33e1118cc6 fix: restore .value access when using -AllPages on group queries
Invoke-GraphRequest with -AllPages returns the full response object
with accumulated items in .value, not a flat array.
2026-04-14 18:39:50 +02:00
tomas.kracmar 77f7372d44 fix: fetch all groups via -AllPages for large tenants
Replaces default 100-item page limits and =999 workarounds
with -AllPages on group queries across assignment and baseline scripts.
Enables full fzf inline search/filter for group selection.
2026-04-14 18:36:23 +02:00
tomas.kracmar 773ab12901 fix(launcher): strip unsupported auth params when calling Initialize-IntuneAuth 2026-04-14 18:27:40 +02:00
tomas.kracmar 68a5af1af3 chore: ignore GraphMetaData.xml and CloudAPIPowerShellManagement cache files 2026-04-14 15:12:52 +02:00
tomas.kracmar e13d14edcb feat(toolkit): complete macOS Intune Toolkit v1
Core enhancements:
- Expanded default export/import scope to ~45 object types including DeviceManagementIntents
- Added -AllPages pagination support across Graph queries for large tenants
- Invoke-GraphRequest now throws on 4xx/5xx instead of silently returning null
- Added macOS Keychain fallback for secret retrieval in headless auth flow
- Added NameSearchPattern/NameReplacePattern mutation support through export/import forms

New toolkit scripts:
- Bulk-AppAssignment.ps1: bulk-assign apps to groups/All Users/All Devices
- Bulk-AssignmentManager.ps1: add/remove assignments for any policy type with correct @odata.type
- Backup-Restore-Assignments.ps1: JSON backup with cross-tenant group resolution
- Export-AssignmentsToCsv.ps1: CSV/Markdown documentation output
- Bulk-RenamePolicies.ps1: regex search/replace and prefix mutations
- Bulk-DeviceOperations.ps1: delete/retire/wipe/lock/sync with -WhatIf safeguards
- Start-IntuneManagementTui.ps1: interactive terminal UI for headless operations
- Create-IntuneManagementApp.ps1: helper for app registration setup

Updated existing scripts:
- Export-Policies.ps1 / Import-Policies.ps1: wired mutation params through
- Start-HeadlessIntune.ps1: integrated TUI and new parameter forwarding
2026-04-14 15:11:09 +02:00
tomas.kracmar 0ddd21ab14 feat(launcher): add baseline deployer to unified menu
- Adds 'Deploy baseline' and 'Deploy baseline (dry-run / WhatIf)' to Start-IntuneToolkit.ps1
- Ensures WhatIf flag is cleared between menu iterations
2026-04-14 15:05:15 +02:00
tomas.kracmar c4b8f4aaf6 feat(baseline): declarative Intune baseline deployer
- Add Deploy-IntuneBaseline.ps1 for YAML-driven policy + assignment deployment
- Add ConvertTo-IntuneBaseline.ps1 to convert export folders to baseline manifests
- Add example OpenIntuneBaseline YAML in Baselines/
- Supports mutations, group auto-creation, idempotency, and WhatIf mode
2026-04-14 14:59:29 +02:00
tomas.kracmar 87b7af25a7 feat(auth): sync full Graph permission set and patch existing apps
- Unified required Microsoft Graph app roles in Initialize-IntuneAuth.ps1
- Added permission patching for existing app registrations
- Logs the change and operations for audit
2026-04-14 12:15:14 +02:00
tomas.kracmar 9dace83cff Make browser auth app id optional 2026-04-08 19:10:45 +02:00
tomas.kracmar 239e3ec16e Add browser auth for headless runs 2026-04-08 16:09:30 +02:00
tomas.kracmar c803a00df7 Strip legacy UI and keep headless runtime 2026-04-08 15:35:04 +02:00
tomas.kracmar 8fe71c0078 Add headless macOS CLI workflow 2026-04-08 15:18:32 +02:00
Mikael KarlssonandGitHub faffa95d8a Merge pull request #363 from Micke-K/Development
3.10.1 Release
2025-09-14 14:19:01 +10:00
Mikael Karlsson 485a9de855 3.10.1 2025-09-14 14:15:15 +10:00