Create Active Directory User

Declaration

<CREATEADUSER LDAPPATH="text" FIRSTNAME="text" INITIALS="text" LASTNAME="text" FULLNAME="text" USER="text" PREWINDOWLOGONUSERNAME="text" NEWPASSWORD="text" EMAIL="text" MUSTCHANGEPASSWORD="Yes/No" />

See Also

Description

Creates a new user at the specified Active Directory location.

IMPORTANT: In order to properly use AutoMate's Active Directory actions, you should have a basic understanding of Active Directory and related components (e.g. domain controllers, trust relationships, forests, OUs, LDAPs, etc.) Also, to ensure that these actions function appropriately, the target system must be part of a domain.

Practical Usage

Commonly used to automate the normally tedious process of creating new Active Directory users. Use the Create Active Directory Group action to create a group in which to add users to.

Parameters

General Properties

Property

Type

Required

Default

Markup

Description

Parent Path

Text

Yes

(Empty)

LDAPPATH=

"LDAP://DC=netauto,DC=com"

The Lightweight Directory Access Protocol (LDAP) path of the parent Active Directory container. This is usually the top most container or rootDSE path, the root of the directory data tree on a directory server.

Click the Select Container button to launch a standard Windows Active Directory dialog box that allows for the selection an Active Directory container.

First Name

Text

Yes

(Empty)

FIRSTNAME="Mike"

The first name of the Active Directory user to be created.

Initials

Text

No

(Empty)

INITIALS="R"

The initials of the Active Directory user to be created.

Last Name

Text

No

(Empty)

LASTNAME="Rogers"

The last name of the Active Directory user to be created.

Full Name

Text

Yes

First Name, Initial & Last Name property combined

FULLNAME="Mike R. Rogers

The full name of the Active Directory user to be created.

This property defaults to the data entered in the First Name, Initial and Last Name parameters combined.

↑ Top of Page

Login Details Properties

Property

Type

Required

Default

Markup

Description

User Logon Name (@domain is allowed)

Text

Yes

(Empty)

USER="MRogers@netauto.com"

The logon name of the Active Directory user to be created.

User Logon Name (Pre-Windows 2000)

Text

Yes

(Empty)

PREWINDOWLOGONUSERNAME="MRogers"

The Pre-Windows 2000 logon name of the Active Directory user to be created. This defaults to the data entered in the User Logon Name (@domain is allowed) property minus the @domain parameter (if applicable).

Password

Text

Yes

(Empty)

NEWPASSWORD="password"

The logon password of the Active Directory user to be created.

E-mail

Text

No

(Empty)

EMAIL="mike@netauto.com"

The e-mail address of the Active Directory user to be created.

User must change password at next login

Yes/No

No

No

MUSTCHANGEPASSWORD="YES"

If set to YES, specifies that the user must modify his/her password at next login session. If set to NO, the user must use the password specified in the Password parameter. The default value is NO.

User cannot change password

Yes/No

No

No

USERCANNOTCHANGEPASSWORD="YES"

If set to YES, specifies that the user cannot change the assigned password. The default value is NO. This parameter is available only if the User must change password at next login parameter is set to NO.

Password never expires

Yes/No

No

No

PASSWORDNEVEREXPIRES="YES"

If set to YES, indicates that the assigned password never expires. The default value is NO.

Account is disabled

Yes/No

No

No

DISABLEACCOUNT="YES"

If set to YES, indicates that the account to be created is in a disabled state. The default value is NO.

↑ Top of Page

Credentials Properties

Property

Type

Required

Default

Markup

Description

Username

Text

No

(Empty)

USERNAME="username"

The username of the Active Directory user.

NOTE: Leave the Username and Password fields blank in order to use the logon user's credentials. If only accessing Active Directory information, then any Domain user is valid. However, a Domain Administrator is required in order to modify an Active Directory user or group. We recommend using the credentials of a Domain Administrator for all AutoMate Active Directory actions.

Password

Text

No

(Empty)

PASSWORD="password"

The password of the Active Directory user.

NOTE: Leave the Username and Password fields blank in order to use the logon user's credentials. If only accessing Active Directory information, then any Domain user is valid. However, a Domain Administrator is required in order to modify an Active Directory user or group. We recommend using the credentials of a Domain Administrator for all AutoMate Active Directory actions.

 

Description Properties

The Description tab allows you to customize the text description of any step as it appears in the Task Builder's Steps Pane.

More on setting custom step description

Error Causes Properties

The Error Causes tab properties allows you to instruct a task step to react only to specific errors or ignore certain errors that should cause it to fail.

More on Error Causes properties

On Error Properties

The On Error tab properties lets you determine what the task should do if a particular step encounters an error as defined in the Error Causes properties.

More about On Error properties

Additional Notes

Expressions, Variables and Functions

All text fields allow the use of expressions such as variables, functions or AutoMate extended functions, which can be entered by surrounding the expression in percentage signs (example: %FileDateTime(myVar)% or %myVar%, %Left('Text',2)%). To help construct these expressions, you can open Expression Builder from these fields by clicking the Insert Expression (%) button or by pressing F2.

More on expressions

More on variables

More on function

More on extended functions
More on the expression builder

Example

NOTE: The code below can be copied and pasted directly into the Steps pane of the Task Builder.

 

Description: Create user "PParker" (full name: Peter Parker) at location "LDAP://mycompanyserver.com".

<CREATEADUSER LDAPPATH="LDAP://mycompanyserver.com" FIRSTNAME="Peter" INITIALS="S" LASTNAME="Parker" FULLNAME="Peter S. Parker" USER="PParker" PREWINDOWLOGONUSERNAME="PParker" NEWPASSWORD="AM2KhmMg3vfZtsoGZuDe99x2z8Z6IMd3xXZaME" EMAIL="PParker@mycompany.com" MUSTCHANGEPASSWORD="YES" USERNAME="username" PASSWORD="AM2LRmbg3zfZtstGZuDfN9m20wZ6IMd3xXbaME" />

↑ Top of Page