diff --git a/CHANGELOG_macOS_IntuneToolkit.md b/CHANGELOG_macOS_IntuneToolkit.md index efa3d0a..56c3f10 100644 --- a/CHANGELOG_macOS_IntuneToolkit.md +++ b/CHANGELOG_macOS_IntuneToolkit.md @@ -1,5 +1,13 @@ # macOS Intune Toolkit Changelog +## 2026-08-07 — v4.3.1 — Fix redundant action prompt + +### Fixed +- **`Scripts/Private/Start-IntuneManagementTui.ps1`** + - Choosing **1. Export policies** or **2. Import policies** in the launcher still re-asked "Select action" (Export/Import/DeployCISBaseline/GenerateReports) — the same missing-passthrough issue as the tenant re-prompt fix below, just for `-Action`. Now accepts `-Action` and skips the prompt when it's already supplied. +- **`Start-IntuneToolkit.ps1`** / **`Scripts/Start-HeadlessIntune.ps1`** + - Menu items 1/2 now pass `-Action Export` / `-Action Import` through to the headless script and on to the TUI. + ## 2026-08-07 — v4.3.0 — Bulk delete tool and TUI fixes ### Added diff --git a/README.md b/README.md index b3f1cec..5208aee 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Cross-platform, headless Intune policy export/import with PowerShell. -**Current version:** `4.3.0` — see [`CHANGELOG_macOS_IntuneToolkit.md`](CHANGELOG_macOS_IntuneToolkit.md) for recent changes. +**Current version:** `4.3.1` — see [`CHANGELOG_macOS_IntuneToolkit.md`](CHANGELOG_macOS_IntuneToolkit.md) for recent changes. This repository is now CLI-first. The old WPF application surface has been removed from the repo. The supported workflow is: diff --git a/Scripts/Private/Start-IntuneManagementTui.ps1 b/Scripts/Private/Start-IntuneManagementTui.ps1 index a2a3f77..89fd143 100644 --- a/Scripts/Private/Start-IntuneManagementTui.ps1 +++ b/Scripts/Private/Start-IntuneManagementTui.ps1 @@ -9,7 +9,8 @@ #> [CmdletBinding()] param( - [string]$TenantId + [string]$TenantId, + [string]$Action ) $ErrorActionPreference = "Stop" @@ -159,8 +160,15 @@ while($true) Write-Host " Press Esc to go back, Space to select" -ForegroundColor DarkGray # 1. Action - $action = Select-MenuItem -Items @("Export","Import","DeployCISBaseline","GenerateReports") -Header "Select action" - if(-not $action) { continue } + if($Action) + { + $action = $Action + } + else + { + $action = Select-MenuItem -Items @("Export","Import","DeployCISBaseline","GenerateReports") -Header "Select action" + if(-not $action) { continue } + } # CIS M365 Baseline deployment flow if($action -eq "DeployCISBaseline") diff --git a/Scripts/Start-HeadlessIntune.ps1 b/Scripts/Start-HeadlessIntune.ps1 index 1376488..98e6533 100644 --- a/Scripts/Start-HeadlessIntune.ps1 +++ b/Scripts/Start-HeadlessIntune.ps1 @@ -84,7 +84,7 @@ if($Interactive) $tuiScript = Join-Path (Split-Path -Parent $PSScriptRoot) "Scripts/Private/Start-IntuneManagementTui.ps1" if(Test-Path $tuiScript) { - $tuiResult = & $tuiScript -TenantId $TenantId + $tuiResult = & $tuiScript -TenantId $TenantId -Action $Action if(-not $tuiResult) { Write-Host "No selection made. Exiting." -ForegroundColor Yellow; exit 0 } foreach($prop in $tuiResult.PSObject.Properties) { diff --git a/Start-IntuneToolkit.ps1 b/Start-IntuneToolkit.ps1 index 6b9ae8b..1ce5053 100644 --- a/Start-IntuneToolkit.ps1 +++ b/Start-IntuneToolkit.ps1 @@ -385,13 +385,14 @@ while($true) # Clear any mode-specific params from previous loop iteration $commonParams.Remove("Interactive") + $commonParams.Remove("Action") $commonParams.Remove("Mode") $commonParams.Remove("WhatIf") switch($choiceNumber) { - 1 { $commonParams.Interactive = $true } - 2 { $commonParams.Interactive = $true } + 1 { $commonParams.Interactive = $true; $commonParams.Action = "Export" } + 2 { $commonParams.Interactive = $true; $commonParams.Action = "Import" } 5 { $commonParams.Mode = "Backup" } 6 { $commonParams.Mode = "Restore" } 11 { $commonParams.WhatIf = $true } diff --git a/VERSION b/VERSION index 8089590..f77856a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.3.0 +4.3.1