Im working on a script that creates users and their home folders.
oShell.Run ("%COMSPEC% /c Echo Y| cacls " & ParentDir & "\" & objuser.sAMAccountName & " /E /T /C /G " & domain & "\" & objuser.sAMAccountName & ":F")
This cacls command is working and sets the security permissions for the user, but I need to keep the administrators permissions on the folder. I tried stacking users like "/E /T /C /G Administrators:F& domain & "\" & objuser.sAMAccountName & ":F") Ive seen examples done this way, but it just wont work for me. Can anybody point me to the right way to remove existing rights and grand Full rights to administrators and the samaccountname user?
thanks for any help
oShell.Run ("%COMSPEC% /c Echo Y| cacls " & ParentDir & "\" & objuser.sAMAccountName & " /E /T /C /G " & domain & "\" & objuser.sAMAccountName & ":F")
This cacls command is working and sets the security permissions for the user, but I need to keep the administrators permissions on the folder. I tried stacking users like "/E /T /C /G Administrators:F& domain & "\" & objuser.sAMAccountName & ":F") Ive seen examples done this way, but it just wont work for me. Can anybody point me to the right way to remove existing rights and grand Full rights to administrators and the samaccountname user?
thanks for any help