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

mjm21
mjm21 used Ask the Experts™
on
Powershell / Quest CommandLets script and export to csv all users in an OU of their samaccountname, DN, and Profile.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Shabarinath RamadasanInfrastructure Architect

Commented:
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

Author

Commented:
Profile did not show up on the .csv
Adam BrownSenior Systems Admin
Top Expert 2010

Commented:
What specific Profile information are you looking for? Home folder, profile path, etc?
Success in ‘20 With a Profitable Pricing Strategy

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Shabarinath RamadasanInfrastructure Architect

Commented:
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

Author

Commented:
logon script name
Here you go.

get-qaduser -searchroot "OU=OUNAME,DC=DOMAINNAME,DC=COM" |select samaccountname,DN,logonscript | export-csv user.csv
Adam BrownSenior Systems Admin
Top Expert 2010

Commented:
Replace Profile with logonscript

Author

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

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial