Avatar of okamon
okamon
 asked on

domain controller: not able to map user home folder

I created a bat file and save in netlogon share folder, this is what I have in my batch file:

NET USE Q: /DELETE
NET USE Q: \\ppiser01\users\%username% /y

Before I put the batch in each user's profile "logon script", I tested within the domain admin account. I double clicked the batch, the cmd screen popped up and disappear but no user folder and Q drive created.

But when I put \\ppiser01\users\%username% in user's profile, under "Home folder" -> connect, it will create the folder and map the drive... so what is wrong with the first method?
Windows Server 2008Active DirectoryWindows Server 2003

Avatar of undefined
Last Comment
tmoore1962

8/22/2022 - Mon
Rsilva98

Why a batch file  ?


Go to AD users and computers and choose Profile Tab on each account.

there you can give the users the home folder you want

Just choose home folder, connect, choose drive letter and put you share on it

Ex: \\server\share$\%username% (when you apply it a folder will be  createt automatically on home folder root)
ASKER CERTIFIED SOLUTION
Steven Carnahan

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
tmoore1962

login batch file needs to be in the windows\sysvol\sysvol\"domain"\scripts folder.
The folder /share Users must exist. Then it should create the username folder under the users folder.  However the ownership will be the admin account and not the user account, also you have to have the permissions setup in the users folder, I've always went the extra step and did the individual folder permissions manually and tested that the desired permissions work.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23