It was determined that we were one version behind so I just installed the latest Admin. Console (v 3.7.13122.0) and there's still an issue. Here's the requested information.
1. Business Unit Screen Shot:

2. Export Script:
Import-Module Adaxes
$sortBy = "employeeID"
$sortDirection = "Ascending"
$envir = "1"
$businessUnitName = "For Export - Active Users (New)"
try
{
$Context.LogMessage("About to export data to LD Service Desk","Information")
if ($envir -eq "1"){
$filePath = "c:\AdaxesConfigurationFiles\(DEV)DirInt0002_Exp_Info.csv"
} else {
$filePath = "c:\AdaxesConfigurationFiles\DirInt0002_Exp_Info.csv"
}
$ExpPath = @()
$LDAPNames = @()
$CSVNames = @()
Import-Csv $filePath |`
ForEach-Object {
$ExpPath += $_."ExportPath"
$LDAPNames += $_."LDAPName"
$CSVNames += $_."FieldsOut"
}
if($ExpPath.Length -eq 0)
{
$Context.LogMessage("No export path found. Processing terminated.", "Warning")
return
}
$Context.LogMessage("Export path is: " + $ExpPath, "Information")
$Context.LogMessage("LDAP Names are: " + $LDAPNames, "Information")
$Context.LogMessage("Output Fields: " + $CSVNames, "Information")
$eachFieldIn = @($LDAPNames[0].split(","))
$eachFieldOut = @($CSVNames[0].split(","))
if (($eachFieldIn.Length -eq 0) -or ($eachFieldOut.Length -eq 0))
{
$Context.LogMessage("Fields missing during import. Processing terminated.", "Warning")
return
}
if (($eachFieldIn.Length) -ne ($eachFieldOut.Length))
{
$Context.LogMessage("Field in/out count mismatch during import. Processing terminated.", "Warning")
return
}
$exportFile = $ExpPath[0]
if (Test-Path $exportFile)
{
Remove-Item $exportFile
}
New-Item $exportFile -Type File
$businessUnitsPath = $Context.GetWellKnownContainerPath("BusinessUnits")
$usersearcher = $Context.BindToObject($businessUnitsPath)
$usersearcher.SearchFilter = "(&(objectCategory=adm-BusinessUnit)(name=$businessUnitName))"
$usersearcher.PageSize = 500
$usersearcher.SearchScope = "ADS_SCOPE_SUBTREE"
try
{
$userResult = $userSearcher.ExecuteSearch()
$objects = $userResult.FetchAll()
if ($objects.Length -gt 1)
{
$Context.LogMessage("Found more than one Business Unit with name '$businessUnitName'.", "Warning")
return
}
if ($objects.Length -eq 0)
{
$Context.LogMessage("Business Unit '$businessUnitName' does not exist.", "Error")
return
}
$unit = $Context.BindToObject($objects[0].AdsPath)
$members = $unit.Members()
$totalUserCount = $members.Count
$Context.LogMessage("The total number of users is: " + $totalUserCount, "Information")
$count = 0
$report = @()
for ($i = 0; $i -lt $totalUserCount; $i++)
{
$userRec = $members.GetObject($i)
$reportRecord = New-Object PSObject
foreach ($propertyName in $eachFieldIn)
{
try
{
switch ($propertyName)
{
"positionPrimarySupervisor" {
try {
$managerDN = $userRec.Get($propertyName)
try
{
$supervisor = $Context.BindToObjectByDn($managerDN)
$value = $supervisor.Get("cn")
}
catch
{
$value = ""
}
}
catch {
$value = ""
}
}
"cn" {
$lname = $userRec.Get("sn")
try {
$fname = $userRec.Get("preferredFirstName")
}
catch {
$fname = $userRec.Get("givenName")
}
try {
$mname = $userRec.Get("middleName")
}
catch {
$mname = ""
}
$value = $lname + " , " + $fname + " " + $mname
}
Default {
$value = $userRec.Get($propertyName)
}
}
}
catch
{
$value = ""
}
$reportRecord | Add-Member -Name $propertyName -Value $value -MemberType NoteProperty
}
$report += $reportRecord
$count++
}
}
finally
{
$userResult.Dispose()
}
$report | ConvertTo-Csv -NoTypeInformation | select -Skip 1 | Set-Content $exportFile
$Context.LogMessage("Total records exported = " + $count, "Information")
}
catch
{
$ErrorMessage = $_.Exception.Message
[string]$LineNumber = $_.InvocationInfo.ScriptLineNumber
[string]$Offset = $_.InvocationInfo.OffsetInLine
[string]$errLine = $_.InvocationInfo.Line
Write-Error $ErrorMessage
$Context.LogMessage("At Line #: " + $LineNumber + " at char " + $Offset, "Error")
$Context.LogMessage("Executing: " + $errLine, "Error")
}
-
Membership Rules:
(&(objectCategory=person)(objectClass=user)(!(employeeID=000000))(!(userAccountControl:1.2.840.113556.1.4.803:=2))(!(employeeID=NMU))(!(employeeID=?))(employeeID=*))
-
Although not requested, here's the activity log from the Export scheduled task:
About to export data to LD Service Desk
Export path is: \\data1\isshared\LD ServiceDesk\TEST_LAndesk HR Data Export.csv
LDAP Names are: cn,employeeID,telephoneNumber,positionPrimarySupervisor,positionSupervisorUID,mail,department,division,buildingName,locationFloor,roomNumber,terminationDate
Output Fields: Name,UID,Phone,Manager,Managers UID,Email Address,Dept,Division,Building,Floor,Room,termDate
The total number of users is: 4721
Total records exported = 4721