Private/Get-ParentObjectId.ps1

Function Get-ParentObjectId{
    param
    (
        [solutioncomponent[]]$Component,
        [guid]$RootSolutionComponentId
    )
    $objectid = ($component | 
        Where-Object -Property SolutionComponentId -eq $Rootsolutioncomponentid | 
        Select-Object ObjectId).ObjectId

    Write-Output $objectid
}