Thanks, that worked perfectly 
However I am left with one really weird problem I'd like to present. I'll explain it on example, let's say we wanna create the user "Jack Schitt" and his login name will be "jschitt"
If you use kix to set the user in AD and use these path's (keep in mind we're not evaluating the strings, just plain as they are)
HomeShare: \\server\profiles$\%username%
ProfilePath: \\server\profiles$\%username%\My Profile
Now we are not actually creating the folders ourselves. When the user logs in for the first time, the folders will be automatically created. And the rights are automatically set. The only problem with that is that Jack Schitt is the owner and sole user who has rights to those folders not even administrator has rights.
Now to step back to where u create the user, now this time when your script has created the user and there are no folders yet. Goto the user properties in the AD, in the homeshare remove a % in %username% and the add the % again, press APPLY and you wll see that AD has created the folders with perfect rights on them Administrator as owner and the user Jack Schitt as user will All rights except "Full Access"
I don't know why this is but I'd love to find out.
_________________________
can not join #Real_Life (invite only)