ActiveDirectory extract issue


hello friends,

trying extract ad users details, 
specific properties looking @ name, samaccountname, description, whencreated, enabled.
powershell command used extracting data is 

(get-aduser -filter * - properties * | select name, samaccountname, description, whencreated, enabled)

after executing above command not able see fields "whencreated" , "enabled" many of accounts.
of accounts displaying many of accounts not. 
when checked object's attribute editor in activedirectory, able see value populated not able see in powershell extract.

kindly suggest can done!!!

hey guys, 
resolved!!!!

use below command expanding property 
get-aduser -filter * -properties * |select name, samaccountname, whencreated, enabled -expandproperty enabled

output of command below.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + categoryinfo          : invalidresult: (cn=xxx x xxx,ou=xxxx,dc=xxx,dc=xxx
   t:psobject) [select-object], getvalueinvocationexception
    + fullyqualifiederrorid : propertyevaluationexpand,microsoft.powershell.co
   mmands.selectobjectcommand

select : exception getting "enabled": "the adapter cannot value of
property "enabled"."
@ line:1 char:37
+ get-aduser -filter * -properties * |select name, samaccountname,
whencreated, en ...
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

in scenario there 20 domain controllers out of 15 rodc , 5 rwdc.
after seeing above issue modified command below , gave me exact output fields populated.

get-aduser -server "readwritedc.com" -filter * - properties * | select name, samaccountname, description, whencreated, enabled

thank guys actively responding thread!!! issue resolved.



Windows Server  >  Directory Services



Comments

Popular posts from this blog

server manager error: ADAM.events.xml could not be enumerated.

Cannot access Anywhere Access using domain name?

WMI Failure: Unable to update Local Resource Group