Avatar of rakkad
rakkad
Flag for United Kingdom of Great Britain and Northern Ireland asked on

Generate a list of AD Users

I need a powershell script written that will produce a list of AD users and if they have a connect drive present in the user's profile tab

I would like the list to be written to an excel spreadsheet
Active Directory

Avatar of undefined
Last Comment
rakkad

8/22/2022 - Mon
athomsfere

Do you need to sort by container? Or for the entire domain?
ASKER CERTIFIED SOLUTION
barrykfl

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Mike Kline

Are you using native powershell or quest cmdlets?

I tested using the free adfind   http://www.joeware.net/freetools/tools/adfind/index.htm

adfind -default -f "&(objectcategory=person)(objectclass=user)(homedirectory=*)" samaccountname homedirectory -csv >  Users.csv

That will give you users that have the homedirectory populated.

Thanks

Mike
athomsfere

A real simple one would also be:

Get-QADUser * | Select-Object Name, HomeDirectory | Export-Csv "C:\Users\aufrench\Desktop\ADDUMP.CSV"

Open in new window


Assuming you use Quest's tools. However, depending on how large your domain is this might be a bad approach. A few hundred users  is no problem, but 10s of thousands and this might not work well on your PC.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
rakkad

ASKER
I do not have Quest's tools.  What do I need to do for this?
Eric Woodford

Love these cmdlets myself. Download them here... Quest PoSh cmdlets
rakkad

ASKER
This helped me to proceed further
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.