I like to add that placeholder in case an object does not have one of those properties set...
 
so...
 
adfind -b <baseDN> -f samaccounttype=805306368 -nodn -csv NULL samaccountname homedirectory
 
etc...
 
-DaveC


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Almeida Pinto, Jorge de
Sent: Thursday, October 12, 2006 1:55 PM
To: [email protected]
Subject: RE: [ActiveDir] How do I print out users and home folders

another option is...
 
joe's magical adfind ;-)
 
ADFIND -b "<DN of your OU>" -f "(&(objectCategory=person)(objectClass=user))" -csv sAMAccountName homeDrive homeDirectory
 
example:
ADFIND -b "OU=USERS,OU=ORG,DC=AD,DC=LAN" -f "(&(objectCategory=person)(objectClass=user))" -csv sAMAccountName homeDrive homeDirectory
 
D:\TOOLS\MISC>ADFIND -b "OU=USERS,OU=ORG,DC=AD,DC=LAN" -f "(&(objectCategory=per
son)(objectClass=user))" -csv sAMAccountName homeDrive homeDirectory
"dn","homeDrive","homeDirectory"
"CN=UserNoR1001,OU=USERS,OU=ORG,DC=AD,DC=LAN","H:","\\SERVER\SHARE\UserNo1001"
"CN=UserNoR1002,OU=USERS,OU=ORG,DC=AD,DC=LAN","H:","\\SERVER\SHARE\UserNo1002"
"CN=UserNoR1003,OU=USERS,OU=ORG,DC=AD,DC=LAN","H:","\\SERVER\SHARE\UserNo1003"
"CN=UserNoR1004,OU=USERS,OU=ORG,DC=AD,DC=LAN","H:","\\SERVER\SHARE\UserNo1004"
"CN=UserNoR1005,OU=USERS,OU=ORG,DC=AD,DC=LAN","H:","\\SERVER\SHARE\UserNo1005"
"CN=UserNoR1006,OU=USERS,OU=ORG,DC=AD,DC=LAN","H:","\\SERVER\SHARE\UserNo1006"
"CN=UserNoR1007,OU=USERS,OU=ORG,DC=AD,DC=LAN","H:","\\SERVER\SHARE\UserNo1007"
"CN=UserNoR1008,OU=USERS,OU=ORG,DC=AD,DC=LAN","H:","\\SERVER\SHARE\UserNo1008"
"CN=UserNoR1009,OU=USERS,OU=ORG,DC=AD,DC=LAN","H:","\\SERVER\SHARE\UserNo1009"
"CN=UserNoR1010,OU=USERS,OU=ORG,DC=AD,DC=LAN","H:","\\SERVER\SHARE\UserNo1010"
 
jorge
 
Met vriendelijke groeten / Kind regards,
Ing. Jorge de Almeida Pinto
Senior Infrastructure Consultant
MVP Windows Server - Directory Services
 
LogicaCMG Nederland B.V. (BU RTINC Eindhoven)
(   Tel     : +31-(0)40-29.57.777
(   Mobile : +31-(0)6-26.26.62.80
*   E-mail : <see sender address>


From: [EMAIL PROTECTED] on behalf of Steve Comeau
Sent: Thu 2006-10-12 18:51
To: [email protected]
Subject: [ActiveDir] How do I print out users and home folders

Anyone have a good script/utility to print out all users (login names) as well as home folder?

 

Thank you.

 

Steve Comeau

IT Manager

Rutgers Athletics

83 Rockefeller Road

Piscataway, NJ  08854

732-445-7802

732-445-4623 (fax)

www.scarletknights.com

 


*** This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. Rutgers University - DIA, 83 Rockafeller Road, Piscataway, NJ www.scarletknights.com ***



This email was sent to you by Reuters, the global news and information company.
To find out more about Reuters visit www.about.reuters.com

Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Reuters Ltd.

Reply via email to