Get-QADUser returns blank values

In the process of upgrading our v6.9 to the latest version but there is a burning issue for which our Operations team is looking for a report. The requirement is to gather the list of all user accounts in AD with their EmployeeIDReference and Division (of which EmployeeIDReference is a virtual attribute. Division is exposed and available using AD PowerShell Modules too)

If I run

Get-QADUser <identity> -IncludedProperties EmployeeIDReference,Division,samAccountName | Select EmployeeIDReference,Division,samAccountName 

It works fine, displays the table correctly.

But If I run 

Get-QADUser -sizeLimit 0 -IncludedProperties EmployeeIDReference,Division,samAccountName | Select EmployeeIDReference,Division,samAccountName

I get all blank attributes for everything except samAccountName.

If I run Get-QADUser -sizeLimit 0 -IncludeAllProperties | Select EmployeeIDReference,Division,samAccountName

it takes forever to run (as each user has about ~200 attributes) but gets there eventually and so is not really desirable. I had a look at the half built data and the info we were looking for is there.

(P.S.: I've already run the connect-qadservice <Servername> -proxy at the beginning>

 

Any thoughts or alternate suggestions?

  • Did you try using the "-DontUseDefaultIncludedProperties" switch to reduce the volume of properties returned?

    I replied to another thread on a similar topic recently - it's still near the top of the discussions list. Please have a look there as well.
  • In reply to JohnnyQuest:

    Thanks Johnny,

    Tried the -DontUseDefaultIncludedProperties and the report took about 24 hours to run (Normally, it is just about an hour to run) and the resulting export had all attributes for all the users and not the ones that I want. For reference, below is what I ran:


    $Attributes = 'DisplayName,SamAccountName,division,Department,Company,employeeid,employeeidreference,employeeNumber,employeeType,AccountIsDisabled,PasswordIsExpired,AccountExpires'

    # Get all the user details and pipe to the output file
    Get-QADUser -Proxy -sizeLimit 0 -IncludedProperties $Attributes -DontUseDefaultIncludedProperties | Export-Csv $outputfilename -NoTypeInformation
  • In reply to muthukumar.p:

    Suggest you change the second line as follows:

    Get-QADUser -Proxy -sizeLimit 0 -IncludedProperties $Attributes -DontUseDefaultIncludedProperties | Select DisplayName,SamAccountName,division,Department,Company,employeeid,employeeidreference,employeeNumber,employeeType,AccountIsDisabled,PasswordIsExpired,AccountExpires | Export-Csv $outputfilename -NoTypeInformation
  • In reply to JohnnyQuest:

    Thanks again. I've started the script and let you know when it is complete.
  • In reply to JohnnyQuest:

    Okay - I've reviewed the report. This time, I don't get all properties but just the attributes that I opted for. But however, does not have any values for department and employeeidreference for any of the users.