-1

I want to export AD user list but my system in not in that Domain. I do have Admin permission. its 2008 AD. I know we can pull the list using dsquery / dsget or get-ADuser but all works when we are running this in same domain.

1 Answer 1

2

You may use the the following from an elevated command prompt:

runas /netonly /user:domain\adminUsername cmd.exe  

(Adding a host entry for the domain name may help/be necessary)

Then run your dsquery command:

dsquery * domainroot -filter "(&(objectCategory=person)(objectClass=user))" -attr samAccountName distinguishedName whenCreated whenChanged lastLogonTimestamp  

It's also possible to connect with AD Users and Computers from the system that is not in the domain.

Run the following from an elevated command prompt:

runas /netonly /user:domain\adminUsername "mmc dsa.msc /server:domainControllerName" 

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .