#
Modules and Functions
This document lists all modules and functions in the WindowsBuildCertificate project, with a summary of their purpose and usage.
See inline documentation in each module for details on parameters, return values, and usage.
CLI Modules LogsCLI HelpCLI MainMenuCLI DeploymentCLI DefaultConfigCLI
Logging Module Category Functions ActiveDirectory Applications WindowsUpdate NetworkConnectivity Miscellaneous IntuneMDM DeviceSecurity DeviceConfiguration CloudServices
Modules yet to be built AppChecks BuildCertificate DeviceChecks ExportScripts IntuneADChecks
#
CLI Modules
- All CLI modules present menu titles in blue (cyan) and documentation/resources in purple (magenta).
- All menu actions, errors, and warnings are logged using Write-Log, which writes only to the custom log file.
- User-facing output is always accessible and free of technical log details.
#
LogsCLI
- File location: modules/LogsCLI.psm1
- Purpose: Provides all log management CLI, menu, and functions for WindowsBuildCertificate.
- Functions:
Get-LogsMenu
: Displays the logs menu and routes user choices to log management actions.Get-CurrentSessionLog
: Opens the current session log file in Notepad for review.Get-PastSessionLogs
: Allows selection and viewing of past session logs, with Out-GridView or console fallback.Save-OldLogs
: Compresses previous months' logs into a zip archive and removes originals.
#
HelpCLI
- File location: modules/CLI/HelpCLI.psm1
- Purpose: Provides the About, Help & Instructions menu for WindowsBuildCertificate.
- Functions:
Show-HelpMenu
: Displays the About, Help & Instructions menu, including project information, copyright, license, and documentation links. Allows the user to open links in the browser or return to the main menu. Logs all actions.
#
MainMenuCLI
- File location: modules/CLI/MainMenuCLI.psm1
- Purpose: Provides the main menu CLI and related functions for WindowsBuildCertificate.
- Functions:
Show-MainMenu
: Displays the main menu, handles user selection, and routes to the appropriate submenu or action. Handles logging and menu navigation.Invoke-ExportScripts
: Stub for script export logic from the main menu. Logs the action and prompts the user to return to the main menu. (Functionality to be implemented.)
#
DeploymentCLI
- File location: modules/DeploymentCLI.psm1
- Purpose: Provides deployment script configuration management CLI and menu for WindowsBuildCertificate.
- Functions:
Show-DeploymentMenu
: Displays the deployment configuration management menu and routes user choices.New-DeploymentConfig
: Creates a new deployment script configuration (stub; logic to be implemented).Edit-DeploymentConfig
: Edits an existing deployment script configuration (stub; logic to be implemented).Export-DeploymentScripts
: Exports scripts from an existing deployment script configuration (stub; logic to be implemented).Save-OldDeploymentConfigs
: Archives deployment configurations not used in the last 90 days (stub; logic to be implemented).Restore-ArchivedDeploymentConfig
: Retrieves an archived deployment configuration (stub; logic to be implemented).Edit-DefaultDeploymentConfig
: Creates or edits the default configuration for all new deployment scripts (stub; logic to be implemented).
#
DefaultConfigCLI
- File location: modules/CLI/DefaultConfigCLI.psm1
- Purpose: CLI logic for editing the default configuration for all new deployment scripts. Provides a robust, accessible menu for toggling, saving, and getting help on configuration options, using the master and user config JSON files.
- Functions:
Edit-DefaultDeploymentConfig
: Main entry for editing the default config. Loads configs, presents menu, handles toggling, saving, help, and logging.Update-ChangedState
: Helper to recalculate changed state for all options.Get-TabOptions
: Helper to filter options by tab/category.
#
Logging Module
- File location: modules/Logging.psm1
- Purpose: Standardised logging and error handling for all scripts and modules. Provides logging, transcript, and error handling utilities for all modules. All log entries include timestamp, username, level, and message.
- Functions:
Write-Log
: Writes a log entry to the log file and a user-friendly message to the terminal. Full detail (timestamp, username, level, etc.) is written to the log file. Only the user-facing message is written to the terminal, with appropriate colour.
#
Category Functions
These modules are stubs for future category-specific validation and logic. All are currently empty and ready for future expansion.
#
ActiveDirectory
- File location: modules/CategoryFunctions/ActiveDirectory.psm1
- Purpose: (Stub) Placeholder for Active Directory validation and logic functions.
#
Applications
- File location: modules/CategoryFunctions/Applications.psm1
- Purpose: (Stub) Placeholder for application validation and logic functions.
#
WindowsUpdate
- File location: modules/CategoryFunctions/WindowsUpdate.psm1
- Purpose: (Stub) Placeholder for Windows Update validation and logic functions.
#
NetworkConnectivity
- File location: modules/CategoryFunctions/NetworkConnectivity.psm1
- Purpose: (Stub) Placeholder for network connectivity validation and logic functions.
#
Miscellaneous
- File location: modules/CategoryFunctions/Miscellaneous.psm1
- Purpose: (Stub) Placeholder for miscellaneous validation and logic functions.
#
IntuneMDM
- File location: modules/CategoryFunctions/IntuneMDM.psm1
- Purpose: (Stub) Placeholder for Intune MDM validation and logic functions.
#
DeviceSecurity
- File location: modules/CategoryFunctions/DeviceSecurity.psm1
- Purpose: (Stub) Placeholder for device security validation and logic functions.
#
DeviceConfiguration
- File location: modules/CategoryFunctions/DeviceConfiguration.psm1
- Purpose: (Stub) Placeholder for device configuration validation and logic functions.
#
CloudServices
- File location: modules/CategoryFunctions/CloudServices.psm1
- Purpose: (Stub) Placeholder for cloud services validation and logic functions.
#
Modules yet to be built
#
AppChecks
- File location: modules/AppChecks.psm1
- Purpose: Application validation functions (Company Portal, OneDrive, Office 365, Teams, Edge, required apps). Provides functions to validate and assist with application setup and sign-in.
- Functions:
- (To be documented as implemented)
#
BuildCertificate
- File location: modules/BuildCertificate.psm1
- Purpose: Core logic for build validation and certificate generation. Contains functions for orchestrating the build process, tracking status, and generating the build certificate.
- Functions:
- (To be documented as implemented)
#
DeviceChecks
- File location: modules/DeviceChecks.psm1
- Purpose: Device validation functions (naming, Secure Boot, BitLocker, PCR7, etc.). Provides functions to validate device state and configuration as per build requirements.
- Functions:
- (To be documented as implemented)
#
ExportScripts
- File location: modules/ExportScripts.psm1
- Purpose: Script export logic for OOBE and post-deployment. Functions to generate and export PowerShell scripts for OOBE and post-deployment use.
- Functions:
- (To be documented as implemented)
#
IntuneADChecks
- File location: modules/IntuneADChecks.psm1
- Purpose: Intune and AD join validation functions. Provides functions to validate Intune enrolment, AD join, and sync status.
- Functions:
- (To be documented as implemented)