Private/AzStackHci.ModuleManagement.Helpers.ps1

# ////////////////////////////////////////////////////////////////////////////
# Strict Mode v1 (PS 5.1 safe) - surfaces reads of uninitialised variables at runtime.
Set-StrictMode -Version 1.0

# Function to check if a command exists

# Timeout (seconds) for PSGallery version checks — prevents hangs when gallery is unreachable
$script:FindModuleTimeoutSeconds = 15

Function Test-CommandExists
{
    Param ($command)

    begin {
        # Write-Debug "Test-CommandExists: Beginning command existence check for '$command'"
        $oldPreference = $ErrorActionPreference
        $ErrorActionPreference = "Stop"
        [bool]$CommandExists = $false
    }

    process {
        try {
            if(Get-Command $command){
                $CommandExists = $true
            }
        } Catch {
            $CommandExists = $false
        } Finally {
            $ErrorActionPreference=$oldPreference
        }

    } # End of process block

    end {
        # Write-Debug "Test-CommandExists: Command existence check completed"

        # Return the result
        return $CommandExists

    }

} # End function Test-CommandExists


# ////////////////////////////////////////////////////////////////////////////
Function Get-AzStackHciEnvironmentCheckerModule {

    begin {
        # Write-Debug "Get-AzStackHciEnvironmentCheckerModule: Beginning Environment Checker module verification"
        # Check if the AzStackHci.EnvironmentChecker module is installed and running the latest version
        $Module = "AzStackHci.EnvironmentChecker"
    }

    process {

        # Check if the module is installed.
        # Force array cast so indexing and .Count behave consistently with 1 or many versions.
        # Sort descending so [0] is always the newest version.
        [Array]$InstalledVersions = @(Get-Module -Name $Module -ListAvailable -ErrorAction SilentlyContinue | Sort-Object -Property Version -Descending)

        # If only one version is installed, set the installed version
        if($InstalledVersions){
            if($InstalledVersions.Count -eq 1) {
                [version]$InstalledVersion = $InstalledVersions[0].Version
            } elseif($InstalledVersions.Count -gt 1) {
                # Multiple versions installed, use the latest version (sorted descending above)
                [version]$InstalledVersion = $InstalledVersions[0].Version
                Write-Warning "There are $($InstalledVersions.Count) versions of 'AzStackHci.EnvironmentChecker' module installed"
            }
            Write-HostAzS "'AzStackHci.EnvironmentChecker' module version $($InstalledVersion.ToString()) is installed" -ForegroundColor "Green"
            # Do nothing, continue with the script

        } elseif(-not($InstalledVersions)){
            # Module not found, ask user to install the module
            Write-HostAzS "Azure Stack HCI Environment Checker module is not installed" -ForegroundColor Red
            if ($script:SilentMode) {
                $InstallModulePrompt = "Y"
            } else {
                $InstallModulePrompt = Read-Host "Would you like to install the dependant module '$Module' now? (Y/N)"
            }
            if(([string]::IsNullOrWhiteSpace($InstallModulePrompt)) -or ($InstallModulePrompt -ne "Y")){
                Throw "Error: Null or not 'Y' response. Exiting script, please install the '$Module' module and re-run the function"

            } elseif($InstallModulePrompt -eq "Y"){
                Write-HostAzS "Installing module '$Module'...." -ForegroundColor "Green"
                try {
                    # Requires -AllowClobber as some functions are included in Az.StackHCI
                    Install-Module -Name $Module -Repository PSGallery -Force -ErrorVariable ModuleInstallError -AllowClobber -Scope AllUsers -Confirm:$false
                } catch {
                    Throw "Error installing module '$Module' - $($_.Exception.Message)"
                }
                if(-not($ModuleInstallError)){
                    Write-HostAzS "Module '$Module' installed successfully" -ForegroundColor "Green"
                } else {
                    Throw "Error installing module '$Module' - $ModuleInstallError"
                }
            } else {
                # All other responses
                Write-HostAzS "Invalid response, please enter 'Y' to install the module..." -ForegroundColor Red
                Throw "Exiting script, please install the '$Module' module and re-run the function"
            }
        }

        # Use -Global so EnvironmentChecker's exported functions land in the global session
        # state instead of being injected into our own module's scope. Without -Global, any
        # exported function from EnvironmentChecker that shares a name with one of OUR private
        # helpers (e.g. Get-SslCertificateChain in EnvironmentChecker 10.2509+) would shadow
        # the private helper at the call site inside our module, with confusing parameter
        # mismatch errors. (See also: rename of our internal helper to Get-AzSHciSslCertificateChain.)
        Import-Module -Name $Module -Force -Global
        # Load URLs from environment checker (Targets.json), check if multiple module version are installed, if so, use the latest version
        $Location = ((Get-Module -Name $Module -ListAvailable) | Sort-Object -Property Version -Descending | Select-Object -First 1).ModuleBase
        if(-not($Location)){
            Write-HostAzS "Azure Stack HCI Environment Checker module not found, please install the module" -ForegroundColor Red
            Write-HostAzS "Run: 'Install-Module -Name AzStackHci.EnvironmentChecker' and troubleshoot any installation issues" -ForegroundColor Green
            Exit
        }

    } # End of process block

    end {
        # Write-Debug "Get-AzStackHciEnvironmentCheckerModule: Environment Checker module verification completed"
        
        # Return the module location
        Return $Location

    }

} # End Function Get-AzStackHciEnvironmentCheckerModule


# ////////////////////////////////////////////////////////////////////////////
# Function to get the latest version of a module from PSGallery
# This function will check for the latest version of a module in the PowerShell Gallery
Function Get-LatestModuleVersion {

    [CmdletBinding()]
    param (
        [Parameter(Mandatory=$true, Position=0)]
        [ValidateNotNullOrEmpty()]
        [string]$ModuleName,

        # Optional out-parameter. When supplied, receives the ACTUAL latest version published
        # (listed) in PSGallery — which may be LOWER than the installed version for a
        # pre-release/dev build. Unlike the return value (clamped to never go below the
        # installed version), this is the true gallery state, so a caller can detect
        # "installed is newer than published". $null when PSGallery is unreachable.
        [Parameter(Mandatory=$false)]
        [ref]$ListedGalleryVersion,

        # Optional out-parameter. When supplied, receives $true if PSGallery was reachable and
        # the listed-version lookup completed, $false on timeout / network error.
        [Parameter(Mandatory=$false)]
        [ref]$GalleryReachable
    )

    begin {
        # Write-Debug "Get-LatestModuleVersion: Beginning latest module version check for '$ModuleName'"
        # ////////////////////////////////////////////
        # ///// Check for latest module version //////
        # ////////////////////////////////////////////
        [bool]$ModuleNotInstalled = $false
        # Initialise here so the end block's `if($LatestModuleVersion)` reference is always
        # valid. The process block only ASSIGNS this when the gallery has a NEWER version;
        # when the installed version is already latest, the assignment branch never runs and
        # an uninitialised reference would throw under Set-StrictMode -Version 1.0.
        [version]$LatestModuleVersion = $null
    }

    process {
        # Get Existing Most Recent Module Version:
        [version]$ExistingModuleVersion = (Get-InstalledModule -Name $ModuleName -ErrorAction SilentlyContinue).Version

        if(-not $ExistingModuleVersion) {
            # Get-InstalledModule only finds modules registered by PowerShellGet (Install-Module).
            # A side-loaded / locally-packaged build — copied straight into
            # \Modules\<Name>\<Version>\ (e.g. Package-Module-Locally.ps1, offline sideload) — is
            # invisible to it. Fall back to Get-Module -ListAvailable so the gallery comparison
            # still runs. This is exactly the dev/test build scenario where "installed is newer
            # than published" is most likely to be true, so without this fallback the
            # newer-than-PSGallery notice could never fire.
            [version]$ExistingModuleVersion = (Get-Module -Name $ModuleName -ListAvailable | Sort-Object -Property Version -Descending | Select-Object -First 1).Version
        }

        if(-not $ExistingModuleVersion) {
            Write-Debug "Module '$ModuleName' is not installed (neither registered via PSGallery nor present on disk). Skipping update check."
            $ModuleNotInstalled = $true
            return
        }

        # ////////////////////////////////////////////////////////////////////////////
        # Version discovery strategy:
        #
        # Step 1 (Fast path): Use Find-Module without -RequiredVersion to check for
        # the latest *listed* version in PSGallery. This is a single network call
        # and works for any module that is publicly listed. If it returns a version
        # higher than the installed version, use it immediately.
        #
        # Step 2 (Fallback for unlisted modules): If Step 1 does not find a newer
        # version, fall back to probing exact version numbers with -RequiredVersion.
        # This is required because Find-Module without -RequiredVersion does NOT
        # return unlisted packages. The only way to discover unlisted versions is
        # by probing exact version numbers.
        # Originally written for a module where all versions were "Unlisted" in
        # the PowerShell Gallery, this fallback has been retained for portability.
        #
        # Fallback version increment strategy:
        # 1. First, increment the Build (z) digit: x.y.z -> x.y.(z+1)
        # 2. If incrementing build finds no match, try rolling over to the next
        # Minor version: x.y.z -> x.(y+1).0
        # 3. If that also finds no match, try rolling over to the next Major
        # version: x.y.z -> (x+1).0.0
        # 4. Only stop if all three probes miss, meaning no further version exists.
        # ////////////////////////////////////////////////////////////////////////////

        # --- Step 1: Fast path — single call for latest listed version ---
        # Note: Find-Module can return multiple results when multiple repositories
        # are registered (e.g. PSGallery + a local repo). Sort descending and pick
        # the highest version across all repositories.
        # Uses Start-Job/Wait-Job with timeout to prevent hangs if PSGallery is unreachable.
        Write-Debug "Checking PowerShell Gallery for latest listed version of '$ModuleName' (timeout: $($script:FindModuleTimeoutSeconds)s)..."
        [version]$ListedVersion = $null
        # NOTE: this local MUST NOT be named $galleryReachable — that would case-insensitively
        # alias the [ref]$GalleryReachable parameter and clobber the PSReference with a [bool],
        # making $GalleryReachable.Value below throw "property 'Value' cannot be found".
        [bool]$galleryProbeSucceeded = $false
        $job = $null
        try {
            $job = Start-Job -ScriptBlock { param($Name) (Find-Module -Name $Name -ErrorAction SilentlyContinue | Sort-Object -Property Version -Descending | Select-Object -First 1).Version } -ArgumentList $ModuleName
            $completed = Wait-Job -Job $job -Timeout $script:FindModuleTimeoutSeconds -ErrorAction SilentlyContinue
            if ($completed -and $completed.State -eq 'Completed') {
                $ListedVersion = Receive-Job -Job $job -ErrorAction SilentlyContinue
                $galleryProbeSucceeded = $true
            } else {
                Write-Debug "Version check timed out after $($script:FindModuleTimeoutSeconds) seconds — attempting to stop background job"
                if ($job) { Stop-Job -Job $job -ErrorAction SilentlyContinue }
            }
        } catch {
            Write-Debug "Version check failed: $($_.Exception.Message)"
        } finally {
            if ($job) {
                Remove-Job -Job $job -Force -ErrorAction SilentlyContinue
                # Verify job is actually gone — orphaned jobs can leak resources.
                $lingering = Get-Job -Id $job.Id -ErrorAction SilentlyContinue
                if ($lingering) {
                    Write-Warning "Find-Module background job (Id $($job.Id)) did not terminate cleanly and is still present."
                }
            }
        }

        # Surface the raw listed gallery version and reachability to the caller (if requested).
        # $ListedVersion is the ACTUAL latest version published in PSGallery — it may be LOWER
        # than the installed version for a pre-release/dev build. It is deliberately NOT clamped
        # here (the return value below is clamped to never drop below installed); these out-refs
        # expose the true gallery state so callers can detect "installed is newer than published".
        if ($PSBoundParameters.ContainsKey('ListedGalleryVersion')) { $ListedGalleryVersion.Value = $ListedVersion }
        if ($PSBoundParameters.ContainsKey('GalleryReachable'))     { $GalleryReachable.Value     = $galleryProbeSucceeded }

        if($ListedVersion -and $ListedVersion -gt $ExistingModuleVersion) {
            # Latest listed version is newer than installed — use it directly
            Write-Debug "Latest listed version v$($ListedVersion.ToString()) is newer than installed v$($ExistingModuleVersion.ToString())"
            [version]$LatestModuleVersion = $ListedVersion
        } elseif (-not $galleryProbeSucceeded) {
            # PSGallery was unreachable (timeout or error) — skip probing, continue with installed version
            Write-Debug "PSGallery unreachable; skipping unlisted version probing. Continuing with installed v$($ExistingModuleVersion.ToString())"
        } else {
            # --- Step 2: Disabled — unlisted version probing commented out ---
            # The module is now publicly listed on PSGallery, so probing for unlisted
            # versions by incrementing build/minor/major is no longer needed.
            # If Step 1 found no newer listed version, the installed version is current.
            if($ListedVersion) {
                Write-Debug "Listed version v$($ListedVersion.ToString()) is not newer than installed v$($ExistingModuleVersion.ToString()). No update needed."
            } else {
                Write-Debug "No listed version found in PSGallery. Continuing with installed v$($ExistingModuleVersion.ToString())."
            }

            <# --- Original Step 2: Fallback — incremental probing for unlisted versions ---
                Originally written for a module where all versions were "Unlisted" in PSGallery.
                Disabled because the module is now publicly listed and this probing adds unnecessary
                Find-Module -RequiredVersion calls that slow down the update check.
 
            [bool]$StopModuleVersion = $false
            [version]$ModuleVersion = $ExistingModuleVersion
 
            # Loop and check if a new unlisted version exists:
            Do {
                [int]$Major = $ModuleVersion.Major
                [int]$Minor = $ModuleVersion.Minor
                [int]$Build = $ModuleVersion.Build
 
                # --- Attempt 1: Increment Build (z) by 1 ---
                [version]$NewModuleVersion = "$Major.$Minor.$($Build + 1)"
                Write-Debug "Checking if module v$($NewModuleVersion) exists in PowerShell Gallery..."
                [version]$FoundVersion = (Find-Module -Name "$ModuleName" -RequiredVersion $NewModuleVersion -ErrorAction SilentlyContinue).Version
 
                if(-not $FoundVersion) {
                    # --- Attempt 2: Roll over to next Minor version (x.(y+1).0) ---
                    [version]$NewModuleVersion = "$Major.$($Minor + 1).0"
                    Write-Debug "Build increment miss. Checking minor rollover v$($NewModuleVersion)..."
                    [version]$FoundVersion = (Find-Module -Name "$ModuleName" -RequiredVersion $NewModuleVersion -ErrorAction SilentlyContinue).Version
                }
 
                if(-not $FoundVersion) {
                    # --- Attempt 3: Roll over to next Major version ((x+1).0.0) ---
                    [version]$NewModuleVersion = "$($Major + 1).0.0"
                    Write-Debug "Minor rollover miss. Checking major rollover v$($NewModuleVersion)..."
                    [version]$FoundVersion = (Find-Module -Name "$ModuleName" -RequiredVersion $NewModuleVersion -ErrorAction SilentlyContinue).Version
                }
 
                if($FoundVersion) {
                    Write-Debug "Higher module version found v$($FoundVersion.ToString())"
                    [version]$LatestModuleVersion = $FoundVersion
                    # Continue searching from the found version
                    [version]$ModuleVersion = $FoundVersion
                } else {
                    # All three probes missed — no further version exists in PSGallery
                    Write-Debug "No match for v$($Major).$($Minor).$($Build + 1), v$($Major).$($Minor + 1).0, or v$($Major + 1).0.0"
                    $StopModuleVersion = $true
                }
 
            } While (-not($StopModuleVersion))
            #>

        }

    } # End of process block

    end {
        # Write-Debug "Get-LatestModuleVersion: Latest module version check completed"

        # If module was not installed via PSGallery, return null (no version to report)
        if($ModuleNotInstalled) {
            return $null
        }
        
        # Return Function output
        if($LatestModuleVersion) {
            Return [version]$LatestModuleVersion
        } else {
            Return [version]$ExistingModuleVersion
        }

    }

} # End Function Get-LatestModuleVersion


# ////////////////////////////////////////////////////////////////////////////
# Auto Update Module Function
Function Update-ModuleVersion {
<#
    .SYNOPSIS
        Checks PSGallery for a newer version of a module. Notifies by default; installs only on opt-in.
 
    .DESCRIPTION
        By default this function is NON-DESTRUCTIVE: it checks PSGallery for a newer version and, if
        found, prints a notification telling the user how to update manually. It does NOT install,
        uninstall or modify anything on the machine.
 
        When -InstallUpdate is specified, the function installs the newer version side-by-side via
        Install-Module and imports it. Older versions are left in place — PowerShell supports
        multiple installed versions natively (each lives under \Modules\<Name>\<Version>\) and
        Import-Module without -RequiredVersion loads the highest installed version automatically,
        so stale copies are harmless. Users who want to tidy up can run
        'Uninstall-Module <Name> -AllVersions' themselves — following standard PowerShell convention
        (this is how Az, Microsoft.Graph, Pester etc. behave).
 
    .PARAMETER ModuleName
        Name of the module to check on PSGallery.
 
    .PARAMETER InstallUpdate
        Opt-in switch. When specified, if a newer version is available it will be installed
        side-by-side via Install-Module. Default is $false (notify-only).
 
    .OUTPUTS
        [bool] $true — a new version was INSTALLED in this call. Caller should re-run because the
                       newly-installed code is not the code currently loaded.
        [bool] $false — no update available, notify-only, install skipped by the caller, or an
                       error occurred. Caller should continue with the currently-loaded version.
#>

    [CmdletBinding()]
    param (
        [Parameter(Mandatory=$true, Position=0)]
        [ValidateNotNullOrEmpty()]
        [string]$ModuleName,

        [Parameter(Mandatory=$false)]
        [switch]$InstallUpdate
    )

    begin {
        # Write-Debug "Update-ModuleVersion: Beginning module update process for '$ModuleName' (InstallUpdate=$($InstallUpdate.IsPresent))"
        [bool]$ModuleUpdated = $false
    }

    process {
        # Pick the highest currently-installed version of the module (a single module can have
        # multiple side-by-side installs under \Modules\<Name>\<Version>\).
        [version]$InstalledModuleVersion = (Get-Module -Name "$ModuleName" -ListAvailable | Sort-Object -Property Version -Descending | Select-Object -First 1).Version

        # Module not installed at all — nothing to check against.
        if(-not $InstalledModuleVersion) {
            Write-HostAzS -ForegroundColor Red "`n`tError: " -NoNewLine
            Write-HostAzS "Module '$ModuleName' is not installed.`n" -ForegroundColor Yellow
            return
        }

        Write-HostAzS -ForegroundColor Green "`n`tChecking for updates..."

        # Query PSGallery. Get-LatestModuleVersion is already defensive: on timeout / network error
        # it returns the currently-installed version, so we safely treat "no newer version" as a
        # no-op below. This means an offline machine will never block the caller.
        # The two out-refs expose the TRUE gallery state (the real listed version, which may be
        # lower than installed for a dev build, and whether the gallery was reachable) so we can
        # distinguish "exactly up-to-date" from "running a build newer than what's published".
        $listedGalleryVersion = $null
        [bool]$galleryReachable = $false
        [version]$LatestModule = Get-LatestModuleVersion -ModuleName $ModuleName -ListedGalleryVersion ([ref]$listedGalleryVersion) -GalleryReachable ([ref]$galleryReachable)

        if(-not ($InstalledModuleVersion -lt $LatestModule)) {
            # Installed version is >= the (clamped) latest. Two sub-cases to distinguish:
            if ($galleryReachable -and $listedGalleryVersion -and ($InstalledModuleVersion -gt $listedGalleryVersion)) {
                # Local build is NEWER than the latest PUBLISHED PSGallery release. This only fires
                # when PSGallery was actually reachable AND returned a strictly-lower listed version
                # (offline runs fall back to installed==latest, so they take the else branch).
                Write-HostAzS -ForegroundColor Green "`n`tINFO: " -NoNewLine
                Write-HostAzS "Running $ModuleName v$($InstalledModuleVersion.ToString()), which is newer than the latest published PSGallery version (v$($listedGalleryVersion.ToString())) — likely a pre-release/dev build.`n"
            } else {
                # Exactly up-to-date, or PSGallery was unreachable and we fell back to installed version.
                Write-HostAzS -ForegroundColor Green "`n`tINFO: " -NoNewLine
                Write-HostAzS "$ModuleName module is up-to-date at v$($InstalledModuleVersion.ToString())`n"
            }
            return
        }

        # ////////////////////////////////////////////////////////////////////////////
        # A newer version IS available. Behaviour depends on -InstallUpdate.
        # ////////////////////////////////////////////////////////////////////////////

        $galleryUrl = "https://www.powershellgallery.com/packages/$ModuleName/$($LatestModule.ToString())"

        if(-not $InstallUpdate) {
            # ----- Notify-only path (default) -----
            # Print a friendly upgrade notice and RETURN WITHOUT MUTATING ANYTHING.
            # The caller continues its run with the currently-loaded version.
            Write-HostAzS ""
            Write-HostAzS -ForegroundColor Yellow "`tINFO: " -NoNewLine
            Write-HostAzS "A newer version of $ModuleName is available: " -NoNewLine
            Write-HostAzS -ForegroundColor Cyan "v$($InstalledModuleVersion.ToString()) -> v$($LatestModule.ToString())"
            Write-HostAzS -ForegroundColor Gray "`t To update, run: " -NoNewLine
            Write-HostAzS -ForegroundColor Cyan "Update-Module $ModuleName"
            Write-HostAzS -ForegroundColor Gray "`t Release notes: " -NoNewLine
            Write-HostAzS -ForegroundColor Cyan $galleryUrl
            Write-HostAzS -ForegroundColor Gray "`t To auto-install + re-run: " -NoNewLine
            Write-HostAzS -ForegroundColor Cyan "re-invoke with -AutoUpdate"
            Write-HostAzS -ForegroundColor Gray "`t To silence this check: " -NoNewLine
            Write-HostAzS -ForegroundColor Cyan "re-invoke with -NoAutoUpdate"
            Write-HostAzS ""
            # ModuleUpdated stays $false — caller continues.
            return
        }

        # ----- Install path (opt-in: -InstallUpdate) -----
        Write-HostAzS -ForegroundColor Yellow "`n`tINFO: " -NoNewLine
        Write-HostAzS "Updating $ModuleName from v$($InstalledModuleVersion.ToString()) to v$($LatestModule.ToString())...`n"

        $ModuleInstallError = $null
        try {
            Install-Module -Name $ModuleName -RequiredVersion $LatestModule -ErrorAction Continue -Force -ErrorVariable ModuleInstallError
        } catch {
            Write-Warning "Error installing latest version $($LatestModule.ToString()) of module $ModuleName. $($_.Exception.Message)"
        }

        if($ModuleInstallError) {
            Write-Warning "Error updating module $ModuleName. $ModuleInstallError"
            return   # $ModuleUpdated remains $false; caller should continue with existing version
        }

        # Unload the currently-loaded module from this session and import the freshly-installed version.
        Remove-Module -Name $ModuleName -ErrorAction SilentlyContinue
        try {
            Import-Module -Name $ModuleName -RequiredVersion $LatestModule -Force -ErrorAction Stop
            # Validate the imported module version matches what we installed. Get-Module may return
            # multiple entries when nested modules are loaded, so pick the highest version.
            $loadedVersion = (Get-Module -Name $ModuleName | Sort-Object -Property Version -Descending | Select-Object -First 1).Version
            if ($loadedVersion -ne $LatestModule) {
                $loadedVersionString = if ($loadedVersion) { $loadedVersion.ToString() } else { '<not loaded>' }
                Write-Warning "Installed v$($LatestModule.ToString()) but loaded v$loadedVersionString. Update may be incomplete."
            }
        } catch {
            Write-Warning "Error importing latest version $($LatestModule.ToString()) of module $ModuleName. $($_.Exception.Message)"
        }

        [bool]$ModuleUpdated = $true
        Write-HostAzS -ForegroundColor Green "`t`tModule updated successfully!`n"
        Write-HostAzS -ForegroundColor Green "`tPlease re-run the function so it executes with the freshly-installed code.`n`n"

        # Older versions are deliberately left in place. PowerShell supports side-by-side installs
        # and Import-Module loads the highest version by default, so stale copies are harmless.
        # Users can tidy up with 'Uninstall-Module <Name> -AllVersions' if they wish.

    } # End of process block

    end {
        # Write-Debug "Update-ModuleVersion: Module update process completed (ModuleUpdated=$ModuleUpdated)"
        # Return $true only when the module was actually reinstalled in this call, so the caller
        # knows to abort and re-run. Notify-only / no-update / error paths all return $false.
        Return $ModuleUpdated
    }
} # End Function Update-ModuleVersion


# ////////////////////////////////////////////////////////////////////////////
# Function to display an ASCII art banner
# This function displays an ASCII art banner in the console
# Font = Slant, credit web-site: https://patorjk.com/software/taag/
Function Show-ASCIIArtBanner {

    begin {
        # Write-Debug "Show-ASCIIArtBanner: Beginning ASCII art banner display"
    }

    process {
        # ASCI Art Banner variable
        [string]$banner=@'
////////////////////////////////////////////////////////////////////////////////////////
                 ___ __ __
                / |____ __ __________ / / ____ _________ _/ /
               / /| /_ / / / / / ___/ _ \ / / / __ \/ ___/ __ `/ /
              / ___ |/ /_/ /_/ / / / __/ / /___/ /_/ / /__/ /_/ / /
             /_/ |_/___/\__,_/_/ \___/ /_____/\____/\___/\__,_/_/
   ______ __ _ _ __ ______ __
  / ____/___ ____ ____ ___ _____/ /_(_) __(_) /___ __ /_ __/__ _____/ /______
 / / / __ \/ __ \/ __ \/ _ \/ ___/ __/ / | / / / __/ / / / / / / _ \/ ___/ __/ ___/
/ /___/ /_/ / / / / / / / __/ /__/ /_/ /| |/ / / /_/ /_/ / / / / __(__ ) /_(__ )
\____/\____/_/ /_/_/ /_/\___/\___/\__/_/ |___/_/\__/\__, / /_/ \___/____/\__/____/
                                                   /____/
////////////////////////////////////////////////////////////////////////////////////////
'@


        Write-HostAzS -ForegroundColor Green `n$banner`n
    }

    end {
        # Write-Debug "Show-ASCIIArtBanner: ASCII art banner display completed"
    }
} # End Function Show-ASCIIArtBanner

# SIG # Begin signature block
# MIInRgYJKoZIhvcNAQcCoIInNzCCJzMCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAhfDXBiJh81zOe
# PUP1IBDeyU5q10Ur8J+MdRfaVSDweqCCDLowggX1MIID3aADAgECAhMzAAACHU0Z
# yE7XD1dIAAAAAAIdMA0GCSqGSIb3DQEBCwUAMFcxCzAJBgNVBAYTAlVTMR4wHAYD
# VQQKExVNa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