Create a user, homedir, and set attributes from a script
Posted on 2004-04-23
Ok, I'm running Windows 2000, active directory. I'm looking to make my life easier when creating users. I'd like a script that I can run that will prompt me (or just enter it at the command line) for username, first name, and last name, and do the rest. I've tried a lot of batch file stuff but haven't been able to do everything I want all at once. So here's what I want to do...
Create the user with a username unrelated to their actual name, their first name and last name in their respective fields and together in the display name.
Set the option for User must change password at next logon
Add logon.bat to the Logon script: option
Add the user to a group.
Then, create a folder, share it (hidden) and grant access to the user, and admins.
The share needs to be accessible by both Win98 and 2k/xp clients.
Additionally, if I can add two other groups with specific rights, that'd be great too.
Thanks in advance!