Hi, I'm new to this forum so I hope this question hasn't already been answered.
The sceanrio is that the Adaxes servert is part of domain A and is used to manage other domains. There's no problem accessing the AD's and create/modify objects. The problem occurs when I try to create a user using business rules and in that rule create a home folder for that user. It seems that Adaxes is then using the service account that runs the Adaxes service and not the specified logon account for the target domain? Is there any way to specify which account that it should use during the business rule run?
I saw one thing that might work, that is to run a PS script (where you can specify runas account) instead but I can't manage to get that to work,. See script below. It gives me this error:
"Exception calling "AddAccessRule" with "1" argument(s): "Some or all identity references could not be translated.""
Any help is much appreciated!
#Create Users homefolder
$homeFolder = "\\fileserver\Users"
$userHome = "$homeFolder\%username%"
New-Item "$userHome" -type Directory
$acl = Get-Acl $userHome
#Add full control user permissions
$rule = New-Object System.Security.AccessControl.FileSystemAccessRule("%username%","FullControl","ContainerInherit, ObjectInherit", "None", "Allow")
$acl.AddAccessRule($rule)
#Commit Changes
Set-Acl $userHome $acl