Link to home
Start Free TrialLog in
Avatar of talltree
talltree

asked on

Read only copy of Active Directory

Hi Experts,


I need to pull a copy of all active directory users. I have read access with no DC access or tools. I was using get-aduser commands from powershell but was thinking I need to add the  -server and -credentials parameters to retrieve the data and I not sure of the syntax etc.


Thank you

Avatar of footech
footech
Flag of United States of America image

The AD cmdlets will choose a DC automatically and use your logged on credentials.  No need to specify the -Server or -Credential parameters unless you need to use something different.
As a quick test, just run
Get-ADUser -Filter *

Open in new window

which should return a default set of properties for all users.  You can specify just one account as well for a test.
Get-ADUser yourusername

Open in new window


You can see the syntax and examples for Get-ADUser by looking the help (either downloaded or online).
What data are you looking to extract?
Username, sids, group membership, hashed password.

What is the end goal you want to get to?
arnold's question is a good one.  In my mind, a "read-only copy of AD (or just its users)" is much different than exporting select data for user accounts (however you might define those).  Exporting the data also has to account for what the end format is going to be, as many attributes in AD don't easily go into something like a .CSV.
Avatar of talltree
talltree

ASKER

Hi guys,
I need username, user email address, location and status, disabled or active.
Get-aduser will be a way to extract some
From additional location.
There are references on pulling additional data...
Specify which AD attributes you want with the -Properties parameter of Get-ADUser.  Put in the ldapDisplayName of each attribute.
Using Poweshell from my laptop I receive Get-ADUser is not recognized as the name of a cmdlet.
ASKER CERTIFIED SOLUTION
Avatar of arnold
arnold
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks guys