Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I tried the following to create a user and assign a home directory to the user.

$comp = [ADSI]'WinNT://localhost,computer';
$user = $comp.Create('User', 'account14');

Here the directory accountis not already present. So ideally it should be created and assigned as the home directory. If we check the properties of the user account14, C:\Users\account14 is listed as the local path, but the directory is not created. In the properties dialogue box of the user, under the profile tab if we click apply, the directory gets created.

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.