New-ADUser -HomeDirectory not creating folder

I am working on a bulk user import project, and I notice regardless whether the Home Directory column in the Excel spreadsheet contains a path of \dc1\Test%username% or \dc1\Test\ejohnson, it inserts the text in the To: box as is, but it does not create the folder. When using %username" variable, it does not reflect the actual username (ejohnson), and simply echos the variable name. I can remove \dc1\Test%username%, save the change, paste it back, and save it again and it reflects “\dc1\Test\ejohnson”. However, even when signing in as the user, the folder is not created. I am just wondering can the actual folder get created as part of the import script?

#Create AD User
New-ADUser -Name “$($user.‘First Name’) $($user.‘Last Name’)” -HomeDrive $user.'Home Drive'
-HomeDirectory $user.‘Home Directory’ `

Hi @erikm

Right, the home folder specified in the user’s profile with \dc1\Test%username% should be automatically created upon the user’s first login.

Be sure to have the share created, as in the example, the Test folder with the proper permissions for the %username% folder gets created when the user log in.

Ricardo