function prepareADObjectsByType {
    Param
    (
        [Parameter(Mandatory = $true, Position = 0)]
        [String] $typeTag
    )
    $adGroupObjects = @()
    $counter = 1
    $count = $ADObjects.Count
    foreach ($adObject in $ADObjects) {
        outLog ('foreach $adObject in $ADObjects: ' + $adObject.ObjectName)
        if (-Not ($adObject.Description)) {
            ### outLogVerbose 'if (-Not ($adObject.Description)) -> true'
            $adObject.Description = $Config.EmptyDescription
        }

        $currentADObject = $null
        if ($typeTag -ieq $FI.TypeTagAppConfiguration) {
            ### outLogVerbose 'if ($typeTag -ieq $FI.TypeTagAppConfiguration) -> true'
            if ($adObject.OU -cmatch $FI.RelevantGroups.AppConfiguration.Filter) {
                ### outLogVerbose 'if ($adObject.OU -cmatch $FI.RelevantGroups.AppConfiguration.Filter) -> true'
                $userMemberShips = @()
                $adObjectEntry = @{ObjectName = $adObject.ObjectName; Path = $adObject.OU; ShortCut = $FI.RelevantGroups.AppConfiguration.ShortCut; Description = $adObject.Description; Users = $userMemberShips}
                $adObjectFileEntry = $adObject.ObjectName + ";" + $adObject.OU + ";" + $FI.RelevantGroups.AppConfiguration.ShortCut + ";" + $adObject.Description
                $adObjectFileEntry | out-file $AppConfigurationTmpFilePath  -Encoding "utf8NoBom" -Append
                $adGroupObjects += $adObjectEntry
                $counter++  
                if ($IsTestMode -and ($counter -gt $Config.TestMode) ) {
                    ### outLogVerbose 'if ($IsTestMode -and ($counter -gt $Config.TestMode)) -> true'
                    break
                }
            }
        }
        elseif ($typeTag -ieq $FI.TypeTagAppAccess) {
            ### outLogVerbose 'elseif ($typeTag -ieq $FI.TypeTagAppAccess) -> true'
            if ($adObject.OU -cmatch $FI.RelevantGroups.AppAccess.Filter) {
                ### outLogVerbose 'if ($adObject.OU -cmatch $FI.RelevantGroups.AppAccess.Filter) -> true'
                $userMemberShips = @()
                $adObjectEntry = @{ObjectName = $adObject.ObjectName; Path = $adObject.OU; ShortCut = $FI.RelevantGroups.AppAccess.ShortCut; Description = $adObject.Description; Users = $userMemberShips}
                $adObjectFileEntry = $adObject.ObjectName + ";" + $adObject.OU + ";" + $FI.RelevantGroups.AppAccess.ShortCut + ";" + $adObject.Description
                $adObjectFileEntry | out-file $AppAccessTmpFilePath  -Encoding "utf8NoBom" -Append
                $adGroupObjects += $adObjectEntry
                $counter++  
                if ($IsTestMode -and ($counter -gt $Config.TestMode) ) {
                    ### outLogVerbose 'if ($IsTestMode -and ($counter -gt $Config.TestMode)) -> true'
                    break
                }
            }    
        }
        elseif ($typeTag -ieq $FI.TypeTagFileSystemAccess) {
            ### outLogVerbose 'elseif ($typeTag -ieq $FI.TypeTagFileSystemAccess) -> true'
            if ($adObject.OU -cmatch $FI.RelevantGroups.FilesystemAccess.Filter) {
                ### outLogVerbose 'if ($adObject.OU -cmatch $FI.RelevantGroups.FilesystemAccess.Filter) -> true'
                $userMemberShips = @()
                $adObjectEntry = @{ObjectName = $adObject.ObjectName; Path = $adObject.OU; ShortCut = $FI.RelevantGroups.FilesystemAccess.ShortCut; Description = $adObject.Description; Users = $userMemberShips}
                $adObjectFileEntry = $adObject.ObjectName + ";" + $adObject.OU + ";" + $FI.RelevantGroups.FilesystemAccess.ShortCut + ";" + $adObject.Description
                $adObjectFileEntry | out-file $FilesystemAccessTmpFilePath  -Encoding "utf8NoBom" -Append
                $adGroupObjects += $adObjectEntry
                $counter++  
                if ($IsTestMode -and ($counter -gt $Config.TestMode) ) {
                    ### outLogVerbose 'if ($IsTestMode -and ($counter -gt $Config.TestMode)) -> true'
                    break
                }
            } 
        }
        elseif ($typeTag -ieq $FI.TypeTagOrganisation) {
            ### outLogVerbose 'elseif ($typeTag -ieq $FI.TypeTagOrganisation) -> true'
            if ($adObject.OU -cmatch $FI.RelevantGroups.Organisation.Filter) {
                ### outLogVerbose 'if ($adObject.OU -cmatch $FI.RelevantGroups.Organisation.Filter) -> true'
                $userMemberShips = @()
                $adObjectEntry = @{ObjectName = $adObject.ObjectName; Path = $adObject.OU; ShortCut = $FI.RelevantGroups.Organisation.ShortCut; Description = $adObject.Description; Users = $userMemberShips}
                $adObjectFileEntry = $adObject.ObjectName + ";" + $adObject.OU + ";" + $FI.RelevantGroups.Organisation.ShortCut + ";" + $adObject.Description
                $adObjectFileEntry | out-file $OrganisationTmpFilePath  -Encoding "utf8NoBom" -Append
                $adGroupObjects += $adObjectEntry
                $counter++  
                if ($IsTestMode -and ($counter -gt $Config.TestMode) ) {
                    ### outLogVerbose 'if ($IsTestMode -and ($counter -gt $Config.TestMode)) -> true'
                    break
                }
            }
        }
        elseif ($typeTag -ieq $FI.TypeTagSecurity) {
            ### outLogVerbose 'elseif ($typeTag -ieq $FI.TypeTagSecurity) -> true'
            if ($adObject.OU -cmatch $FI.RelevantGroups.Security.Filter) {
                ### outLogVerbose 'if ($adObject.OU -cmatch $FI.RelevantGroups.Security.Filter) -> true'
                $userMemberShips = @()
                $adObjectEntry = @{ObjectName = $adObject.ObjectName; Path = $adObject.OU; ShortCut = $FI.RelevantGroups.Security.ShortCut; Description = $adObject.Description; Users = $userMemberShips}
                $adObjectFileEntry = $adObject.ObjectName + ";" + $adObject.OU + ";" + $FI.RelevantGroups.Security.ShortCut + ";" + $adObject.Description
                $adObjectFileEntry | out-file $SecurityTmpFilePath  -Encoding "utf8NoBom" -Append
                $adGroupObjects += $adObjectEntry
                $counter++  
                if ($IsTestMode -and ($counter -gt $Config.TestMode) ) {
                    ### outLogVerbose 'if ($IsTestMode -and ($counter -gt $Config.TestMode)) -> true'
                    break
                }
            }
        }
        elseif ($typeTag -ieq $FI.TypeTagRole) {
            ### outLogVerbose 'elseif ($typeTag -ieq $FI.TypeTagRole) -> true'

            if ($adObject.OU -like "*Anwenderrollen*") {
                ### outLogVerbose 'if ($adObject.OU -like "*Anwenderrollen*") -> true'
                $userMemberShips = @()
                $adObjectEntry = @{ObjectName = $adObject.ObjectName; Path = $adObject.OU; ShortCut = $FI.RelevantGroups.Role.ShortCut; Description = $adObject.Description; Users = $userMemberShips}
                $adObjectFileEntry = $adObject.ObjectName + ";" + $adObject.OU + ";" + $FI.RelevantGroups.Role.ShortCut + ";" + $adObject.Description
                $adObjectFileEntry | out-file $RoleTmpFilePath  -Encoding "utf8NoBom" -Append
                $adGroupObjects += $adObjectEntry
                $counter++  


                if ($IsTestMode -and ($counter -gt $Config.TestMode) ) {
                    ### outLogVerbose 'if ($IsTestMode -and ($counter -gt $Config.TestMode)) -> true'
                    break
                }
            }
        }

    }
    return $adGroupObjects
}
