locked
Powershell command to import domain user account properties RRS feed

  • Question

  • Hi Team,

    I am not getting complete user account properties using get-aduser command.

    In one domain controller I am getting 114 properties , whereas in other domain controller I am getting only 77 parameters. Due to this I am not able to find "Account Status"

    Please let me know what settings are required to import all items from properties.


    • Edited by Shan_VS Monday, January 8, 2018 5:24 AM
    Monday, January 8, 2018 5:22 AM

All replies

  • Get-AdUser -Filter * -Properties *

    If there are issues with your DCs than you will have to take steps to repair them.  We cannot address that issue here.


    \_(ツ)_/

    Monday, January 8, 2018 5:53 AM
  • There are very many attributes of user objects in Active Directory, some of which cannot be displayed. If you use Get-ADUser with -Properties * to retrieve information on one user, the cmdlet will only return values for the default properties exposed by the cmdlet, plus any other attributes that can be displayed and have values (the value is not missing). If you specify specific attributes with the -Properties parameter, Get-ADUser will retrieve all of them, and list null for any without values.

    But the information retrieved should be the same no matter which DC in the domain is used, unless your DC's are not synchronizing. If you have multiple domains, and the user is a member of groups in another domain, then group membership can be different if one DC is a Global Catalog and the other is not.

    The situation is more complicated if you are requesting information on more than one user with one Get-ADUser statement (again using -Properties *). Then you will get values for all default properties, but only the values for other attributes where the first user in the collection has values.

    If by account status you mean the Enabled property, that is a default property. All users will have a value and Get-ADUser should return the value for all users.


    Richard Mueller - MVP Enterprise Mobility (Identity and Access)


    Monday, January 8, 2018 9:49 AM