Private/New-SpecModuleManifest.ps1

function New-SpecModuleManifest {
    [cmdletbinding()]

    param (
        [parameter (mandatory = $true)]
        [string]$moduleName,

        [parameter (mandatory = $true)]
        [string]$modulePath,

        [parameter (mandatory = $true)]
        [string]$moduleShortDescription
    )

    $tags = @('spec')
    $fullModulePath = Join-Path $modulePath $moduleName

    $params = @{
        path              = (join-path $fullModulePath "$moduleName.psd1")
        rootModule        = $moduleName
        moduleversion     = '1.0.0'
        author            = (Get-CimInstance -ClassName CIM_ComputerSystem).username | Split-Path -Leaf
        CompanyName       = 'Specsavers'
        Description       = $moduleShortDescription
        Powershellversion = '3.0'
        tags              = $tags
        releaseNotes      = '* 1.0.0 - Initial Release to PowerShell Gallery'
        Copyright         = '(c) 2023 Specsavers. All rights reserved.'
    }

    try {
        Write-Verbose "Creating module manifest (.psd1)"
        New-ModuleManifest @params
        return $true
    } catch {
        write-warning "Unable to create the module manifest."
        return $false
    }
}