packages/AzStackHci.DiagnosticSettings.0.6.8/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
# MIInQgYJKoZIhvcNAQcCoIInMzCCJy8CAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAhfDXBiJh81zOe
# PUP1IBDeyU5q10Ur8J+MdRfaVSDweqCCDLowggX1MIID3aADAgECAhMzAAACHU0Z
# yE7XD1dIAAAAAAIdMA0GCSqGSIb3DQEBCwUAMFcxCzAJBgNV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