neha gupta wrote:

> Hi Alex,
> Could you please confirm on which Active Directory cmdlets used for
> 'homedirectory' creation & assign rights to the user?

Active Directory cmdlets are for accessing Active Directory objects.

Don't confuse "magic" that happens behind the scenes when you set homedirectory in the "Active Directory Users & Computers" snapin as an actual Active Directory function.

For assigning rights, I wrote a function that used some .NET methods (System.Security.AccessControl, System.Security.Principal) to set the ACE/ACL as Powershell's inbuilt capabilities for manipulating rights were severly lacking at the time I implemented this.
For creating the actual home directory, I used a standard built-in powershell cmdlet

New-Item $HomeDirPath -type directory

Note: I used the scripting driver for this, however I believe the AD driver's powershell integration should be able to call these same cmdlets/functions.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below...