Public/Get-PSModuleInfo.ps1

function Get-PSModuleInfo {
    <#
    .SYNOPSIS
    Gets detailed information about a PowerShell module from the Gallery.
    .DESCRIPTION
    Retrieves full metadata for a specific module including all fields.
    .PARAMETER Name
    The module name.
    .PARAMETER Repository
    The repository to query. Default is PSGallery.
    .EXAMPLE
    Get-PSModuleInfo -Name "Pester"
    #>

    [CmdletBinding()]
    [OutputType('GalleryModuleInfo')]
    param(
        [Parameter(Mandatory, Position = 0)]
        [ValidateNotNullOrEmpty()]
        [string]$Name,

        [string]$Repository = 'PSGallery'
    )

    $result = Invoke-ProviderGetInfo -Name $Name -Repository $Repository
    if (-not $result) {
        return
    }
    $result
}