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.
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
# macOS Intune Toolkit Changelog
|
||||
|
||||
## 2026-11-24 — v4.6.1 — Sequential menu numbers
|
||||
|
||||
### Changed
|
||||
- **`Start-IntuneToolkit.ps1`**
|
||||
- Menu numbers were whatever each item was given when it was added (1, 2, 23, 7, 5, 6, 3, ...). The menu is now a list of entries in display order and the numbers 1-24 are assigned automatically, so adding or moving an entry never needs renumbering. Dispatch still uses stable internal ids. Numbers for items 3 and up changed; the README reference to "delete tenant auth and app registration" is now item **24**.
|
||||
|
||||
## 2026-11-24 — v4.6.0 — Upstream 3.10/3.11 fixes, faster export, lazy migration, drift, bulk scope tags
|
||||
|
||||
### Added
|
||||
|
||||
@@ -169,4 +169,4 @@ By default `Initialize-IntuneAuth.ps1` creates an **app-only** registration. Eve
|
||||
* **Audit logs** show the app's display name (e.g., `IntuneManagement-tomas.kracmar@cqre.net`), not the admin's UPN. The initializer now automatically names the app after the **authenticated Entra user** to improve traceability.
|
||||
* **PIM is not enforced** for app-only secrets. The service principal has standing permissions, so write operations can occur outside an elevated PIM window.
|
||||
* If you need strict PIM compliance, use **delegated authentication** (`-AuthMode Browser` or `-AuthMode DeviceCode`) so calls are made in the signed-in user's context. Note that `DeviceCode` may be blocked by Conditional Access policies.
|
||||
* To fully remove a tenant's local credentials **and** the Entra app registration, use menu item **15** in the TUI or run `./Scripts/Initialize-IntuneAuth.ps1 -TenantId "<id>" -DeleteApp`.
|
||||
* To fully remove a tenant's local credentials **and** the Entra app registration, use menu item **24** ("Delete tenant auth and app registration") in the TUI or run `./Scripts/Initialize-IntuneAuth.ps1 -TenantId "<id>" -DeleteApp`.
|
||||
|
||||
+13
-2
@@ -326,7 +326,9 @@ $commonParams = @{
|
||||
SettingsFile = $SettingsFile
|
||||
}
|
||||
|
||||
$menuItems = @(
|
||||
# Menu entries in display order. Id is the internal dispatch id used below; the number shown to the user
|
||||
# is assigned automatically, so entries can be added or moved without renumbering anything.
|
||||
$menuDefs = @(
|
||||
# Export / Import
|
||||
"1. Export policies"
|
||||
"2. Import policies"
|
||||
@@ -358,6 +360,14 @@ $menuItems = @(
|
||||
"15. Delete tenant auth and app registration"
|
||||
"0. Exit"
|
||||
)
|
||||
$menuIdByNumber = @{}
|
||||
$menuItems = @()
|
||||
for($i = 0; $i -lt $menuDefs.Count; $i++)
|
||||
{
|
||||
$menuIdByNumber[$i + 1] = $menuDefs[$i].Id
|
||||
$menuItems += ("{0}." -f ($i + 1)).PadRight(4) + $menuDefs[$i].Label
|
||||
}
|
||||
$menuItems += "0.".PadRight(4) + "Exit"
|
||||
|
||||
while($true)
|
||||
{
|
||||
@@ -386,7 +396,8 @@ while($true)
|
||||
exit 0
|
||||
}
|
||||
|
||||
$choiceNumber = [int]($selection -replace "^(\d+)\..*$", '$1')
|
||||
$choiceNumber = $menuIdByNumber[[int]($selection -replace "^(\d+)\..*$", '$1')]
|
||||
if($null -eq $choiceNumber) { continue }
|
||||
|
||||
$script = $null
|
||||
switch($choiceNumber)
|
||||
|
||||
Reference in New Issue
Block a user