I forgot to mention that the users don't have permissions to create the folders at that level. Is it possible to use the admin account to create the folder?
Main Topics
Browse All TopicsI'm running a login script that will map some network drives for the users when they log in. I'd like for the script to do a check to see if the users home directory, \\SERVER\Users$\<USER> exists. If the folder exist great, it can continue on. If it does not exist then I would like the script to create the folder and assign the user permissions to the folder. Any ideas on how I can accomplish this goal?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
No, or at least not easily. You don't want to include a password in a script, because users could view it.
Users' home folders should get automatically created when their accounts are set up. If some are missing then it might be better to use an AD query to mass-create them for all of your users at once.
Business Accounts
Answer for Membership
by: Shift-3Posted on 2009-04-23 at 12:42:37ID: 24219012
The script below, inserted at line 21, should do it. This assumes that the user has sufficient permissions to create the folder and change permissions on it.
Select allOpen in new window