functions/Get-S1ConnectionPackages.ps1

<#
.SYNOPSIS
    Short description
.DESCRIPTION
    Long description
.EXAMPLE
    PS C:\> <example usage>
    Explanation of what the example does
.INPUTS
    Inputs (if any)
.OUTPUTS
    Output (if any)
.NOTES
    General notes
#>

function Get-S1ConnectionPackages {
    [CmdletBinding()]
    param (
        [Parameter(Mandatory = $true,
            ValueFromPipeline = $true,
            ValueFromPipelineByPropertyName = $true,
            HelpMessage = "Name of Connection")]
        [ValidateNotNullOrEmpty()]
        [string[]]  $Connection
    )
    Begin {
    }
    
    process {
        $Connection | ForEach-Object { Get-S1Object -Type Packages -Connection $_ } | Convertfrom-S1ConnectionPackageList
        
    }
    
}