# Menu Overview

  • Main menu for build actions
  • Options for continuing, viewing, or restarting builds
  • Prompts for user name and build status
  • Step-by-step validation and export options

# Menu Structure

Below is the full CLI menu structure for WindowsBuildCertificate, using ASCII-art and inline context comments for accessibility and clarity. This reflects the entire project, not just a single screen.

plaintext
=== Windows Deployment Script Creator === (blue)

1. Deployment Script Configuration Management
│   │  (Options 1-5 are all currently stubs, yet to be implemented)
│   │
│   ├── 1. Create new deployment script configuration
│   │      # Start a new config from scratch
│   ├── 2. Edit existing deployment script configuration
│   │      # Edit, validate, and manage an existing config (with file locking)
│   │      ├── a. Select Category (e.g., Intune/MDM, AD, etc.)
│   │      │     ├── i. List/Edit Options in Category
│   │      │     │     ├── Edit Option (details, value, reset, remediation, dependencies)
│   │      │     │     └── Bulk Actions (enable/disable/reset all)
│   │      │     └── ii. Export/Import Category Config
│   │      ├── b. Toggle Advanced Options
│   │      ├── c. Validate/Preview Configuration (dry-run, show issues, show order of operations, and preview complete/incomplete build certificate on screen)
│   │      ├── d. Change History (view, undo, redo; by date and user)
│   │      ├── e. Save/Exit/Discard Changes
│   │      └── f. File Locking (shows who has the file locked, allows force unlock if stale)
│   ├── 3. Export deployment scripts from an existing configuration
│   │      # Export a ready-to-run script for deployment/remediation
│   ├── 4. Archive deployment configurations not used in the last 90 days
│   ├── 5. Restore an archived configuration
│   ├── 6. Create/Update default configuration for all new deployment scripts
│   └── 7. Return to main menu
│
├── 2. Get Logs
│   │
│   ├── 1. View current session log (opens directly in Notepad)
│   ├── 2. View past session logs (Opens grid view to select, before opening in Notepad)
│   ├── 3. Compress Previous Months' Logs
│   └── 4. Back to main menu
│
├── 3. Help
│   │
│   ├── 1. Project License (opens browser)
│   ├── 2. Documentation & Manual (opens browser)
│   ├── 3. Project README.md (opens browser)
│   ├── 4. GitHub Repository (opens browser)
│   └── Enter/X. Return to main menu
│
└── 4. Exit
    # Exit the CLI tool

All menus are modular PowerShell functions. Menu titles use blue, documentation/resources use purple, and all actions are logged. See code for details on menu logic and accessibility.

# How the Default Configuration Editor CLI Works

The Default Configuration Editor (from DefaultConfigCLI.psm1) provides a robust, accessible, and user-friendly CLI for editing the default deployment script configuration. Key features and workflow:

  • Menu Navigation:

    • Tabbed navigation for Pre-Deployment, Post-Deployment, and User Options (use P/T/U keys).
    • Paging support for long lists; never splits a category across pages.
    • Options are grouped by category, with clear headers and columnar layout when space allows.
  • Option Toggling and State:

    • Each option can be toggled on/off by number, with multi-select (e.g., 1,2,3).
    • Changed options are marked with an asterisk (*) and shown in red for accessibility.
    • Batch actions: 'A' = select all, 'N' = select none.
    • Unsaved changes are tracked and prompt before exit.
  • Help and Accessibility:

    • Type '?N' (e.g., '?3') for inline help on any option.
    • All menu cues have non-colour fallbacks and are screen reader friendly.
    • EN-AU spelling and inclusive language throughout.
  • Saving, Reloading, and Exiting:

    • 'S' = save changes, 'R' = reload from file, 'Q' = quit (with unsaved changes prompt).
    • All actions and errors are logged using Write-Log.
  • Robustness:

    • Handles missing or corrupt config files gracefully, with clear error messages and logging.
    • All state recalculation and redraw logic is modular and centralised.
    • Designed for extensibility and regression resistance.

For full details, see the inline documentation in modules/CLI/DefaultConfigCLI.psm1 and the Modules and Functions documentation.