I'm creating active directory users in bulk from a .csv using powershell. Each user has their profile home folder path mapped to a drive letter. The script runs through fine, users are created and everything looks as expected when checking the profile tab of the user in AD. The problem is, when the users log on, their home folder is not mapped to the drive letter. I'm able to get this working by changing the home folder path manually in AD, then changing it back to EXACTLY what the powershell script set it to, so looking at the user in AD there has been no change. Help?
I'm wondering if it's something to do with the permissions check active directory performs when setting a user up manually - it asks "would you like to grant this user full permission over the home folder" (These users already have full permissions for their home folder due to group membership, so the problem isn't that they don't have permission, but perhaps it's because the check hasn't been done?)
Here's the part of the script that sets the home folder:
-HomeDirectory ($HomeDirStart + $_.OU) -HomeDrive $HomeDrv
Note: This is using the New-ADUser cmdlet