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>
This commit is contained in:
@@ -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 }
|
||||
|
||||
Reference in New Issue
Block a user