Through Computer Management when I create a user, a home directory is created for the same user in the folder C:\Users.I am creating a user through powershell in a remote machine.I am using the following script to create user
$comp = [ADSI]'WinNT://localhost,computer';
$user = $comp.Create('User', 'account7');
$user.SetPassword('Welcome1');
$user.SetInfo();
The account is getting created. But no home directory is created for this user. How to create a home directory for a user using powershell? Also the user created through GUI is a member of the group 'Users' by default. How to add the user created to the 'Users' Group.