AD Script

P

Paul Troescher

Hello!

I posted a message about a month ago and received some
really good help, to which I thank all of you.

I find myself with a question, however. I have a script
that will allow me to change users home directories.
However, I have to specify each individual user in order
to change more than one user.

I have inherited a situation in which I need to be able
to change the home directory for multiple users at one
time. With over 1000 users, this is a little much to do
by hand. Is there a way to edit the script below so that
it shall change all users home directories in a given OU?

Thank you for your help!

Paul

<snip>
Set objUser = GetObject _
("LDAP://CN=profile a.
test,OU=Users,OU=profile_test,DC=mycompany,DC=org")

objUser.Put "homeDirectory", "\\drake02file\users$\ptest1"
objUser.Put "homeDrive", "U:"

objUser.SetInfo
</snip>
 
E

Eric Fleischman [MSFT]

Here's a better approach: ADModify
ftp://ftp.microsoft.com/PSS/Tools/Exchange%20Support%20Tools/ADModify/

You could modify the script too though if you'd like. You'd just need to
write a wrapper aorund it that enumerates the contents of the containers
that contain the users and runs the code below against each of those users.

~Eric
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top