Hello,
The script is only creating the generic account and not the xray account.
First of all, for putting some properties of the Xray account, you have messed the variable. We have corrected the script for you, find it below.
# Bind to container
$ou = $Context.BindToObjectEx($Context.TargetObject.AdsPath, $True)
# Create Computers OU
$ComputersOU = $Context.TargetObject.Create("organizationalUnit", "OU=Computers")
$ComputersOU.SetInfo()
# Create XRay OU
$XRayOU = $Context.TargetObject.Create("organizationalUnit", "OU=XRay")
$XRayOU.SetInfo()
# Create 5star user
$5Staruser = $ou.Create("user", "CN=5star%adm-CustomAttributeText13%")
# Update properties of 5star user
$5Staruser.Put("givenName", "5star") # First Name
$5Staruser.Put("sn", "%adm-CustomAttributeText13%") # Last Name
$5Staruser.Put("sAMAccountName", "5star%adm-CustomAttributeText13%") # User Logon Name (pre-Windows 2000)
$5Staruser.Put("unicodePwd", "Staff%adm-CustomAttributeText13%") # Password
$5Staruser.Put("l", "%l%") # City
$5Staruser.Put("st", "%st%") # State
$5Staruser.Put("description", "Generic Account") # Description
$5Staruser.Put("departmentNumber", "%adm-CustomAttributeText13%")
$5Staruser.SetInfo()
# Create XRay user
$XRayUser = $ou.Create("user", "CN=xray%adm-CustomAttributeText13%")
# Update properties of XRay user
$XRayUser.Put("description", "X-Ray Account") # Description
$XRayUser.Put("givenName", "XRay") # First Name
$XRayUser.Put("sn", "%adm-CustomAttributeText13%") # Last Name
$XRayUser.Put("sAMAccountName", "xray%adm-CustomAttributeText13%") # User Logon Name (pre-Windows 2000)
$XRayUser.Put("unicodePwd", "Staff%adm-CustomAttributeText13%") # Password
$XRayUser.Put("l", "%l%") # City
$XRayUser.Put("st", "%st%") # State
$XRayUser.Put("departmentNumber", "%adm-CustomAttributeText13%")
$XRayUser.SetInfo()
Try this script and get back to us with the error messages if you get any.
I sent the screenshot of the account to support(@)adaxes.com
Unfortunately, we did not receive the screenshot. Make sure it is sent to the correct e-mail address.