private/generateNetgroupTripleFromSearchbase.ps1

Function generateNetgroupTripleFromSearchbase {

    [CmdletBinding(DefaultParameterSetName='None')]
    Param(

        [Parameter(Mandatory=$True, Position = 0, ValueFromPipelineByPropertyName=$true, ValueFromPipeline=$true)]
        [string]$SearchBase
    )
    $EndpointList = get-adComputer -searchBase $SearchBase -filter "SAMAccountName -like '*'"
    $NISNetgroupTriple = [System.Collections.Generic.List[String]]::new()
    foreach ($endpoint in $endpointList) {
        $NISNetgroupTriple.add("({0},,)" -f $endpoint.name)
    }
    $NISNetgroupTriple
}