Avatar of mjm21
mjm21
Flag for United States of America asked on

Powershell / Quest CommandLets script and export to csv all users in an OU of their samaccountname, DN, and Profile

Powershell / Quest CommandLets script and export to csv all users in an OU of their samaccountname, DN, and Profile.
Active DirectoryPowershell

Avatar of undefined
Last Comment
mjm21

8/22/2022 - Mon
Shabarinath TR

get-qaduser -searchroot "OU=OUNAME,DC=DOMAINNAME,DC=COM" |select samaccountname, DN, Profile |export-csv user.csv

The attribute names are from my mind. Please correct it accordingly.

Good luck
Shaba
mjm21

ASKER
Profile did not show up on the .csv
Adam Brown

What specific Profile information are you looking for? Home folder, profile path, etc?
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
Shabarinath TR

As I told, You need to key in the exact attribute which you are looking for.
I just put profile as a reference.

Thanks,
Shaba
mjm21

ASKER
logon script name
ASKER CERTIFIED SOLUTION
Joseph Daly

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Adam Brown

Replace Profile with logonscript
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
mjm21

ASKER
running it and added -sl 0 because was not getting all of the users.  Worked like a charm.  Clsoing ticket and awarding points.  Thanks