Testing and executing the script
To execute the script, log on to a computer of the domain with an administrative Active Directory account. Update or enter the Visual Basic script with your favorite editor. Make sure the UMRA Service maintains the project referenced in the script and that the UMRA COM object connects to the appropriate UMRA Service. To execute the script, open a command prompt and enter the name of the script: CreateAccountAccess.vbs.
This will automatically initialize Windows Scripting Host to execute the script. For each account created, the UMRA Service is requested to execute the UMRA project and create the account. A message box is shown for every account that is created.
The UMRA Service log file will contain the log information generated by the service when the script is executed. A listing for a single user account is shown below.
14:57:14 01/05/2006 Variable 1: %Firstname%=John
14:57:14 01/05/2006 Variable 2: %LastName%=Smith
14:57:14 01/05/2006 Variable 3: %UmraFormSubmitAccount%=T4ELOC2\Administrator
14:57:14 01/05/2006 Creating AD account in specified domain: 'tools4ever.local2'.
14:57:15 01/05/2006 Creating AD account in container 'Users'.
14:57:15 01/05/2006 Creating AD account in Organizational Unit-Container: 'LDAP://CN=Users,DC=tools4ever,DC=local2'.
14:57:15 01/05/2006 Creating AD user account in container/OU 'LDAP://CN=Users,DC=tools4ever,DC=local2': Using name generation algorithm 'Default', 100 iterations maximum for duplicate names.
14:57:15 01/05/2006 Creating AD user account in container/OU 'LDAP://CN=Users,DC=tools4ever,DC=local2'. Common name of user set to 'John Smith'.
14:57:15 01/05/2006 Creating AD user account in container/OU 'LDAP://CN=Users,DC=tools4ever,DC=local2'. SAM account name (username) of user set to 'smithj'.
14:57:15 01/05/2006 Creating AD user account in container/OU 'LDAP://CN=Users,DC=tools4ever,DC=local2'. LDAP attribute 'userPrincipalName' of object 'John Smith' set to 'smithj@tools4ever.local2'.
14:57:15 01/05/2006 Creating AD user account in container/OU 'LDAP://CN=Users,DC=tools4ever,DC=local2'. LDAP attribute 'displayName' of object 'John Smith' set to 'John Smith'.
14:57:15 01/05/2006 Creating AD user account in container/OU 'LDAP://CN=Users,DC=tools4ever,DC=local2'. LDAP attribute 'givenName' of object 'John Smith' set to 'John'.
14:57:15 01/05/2006 Creating AD user account in container/OU 'LDAP://CN=Users,DC=tools4ever,DC=local2'. LDAP attribute 'sn' of object 'John Smith' set to 'Smith'.
14:57:15 01/05/2006 Creating AD user account in container/OU 'LDAP://CN=Users,DC=tools4ever,DC=local2'. Password generated ('Strong, 7 chars with 1 numeric, 1 special (variable: %Password%)') and set in variable '%Password%'.
14:57:15 01/05/2006 Creating AD user account in container/OU 'LDAP://CN=Users,DC=tools4ever,DC=local2'. Boolean parameter 'Account disabled'=FALSE (101034). Result not changed.
14:57:15 01/05/2006 Creating AD user account in container/OU 'LDAP://CN=Users,DC=tools4ever,DC=local2'. Boolean parameter 'Password never expires'=FALSE (101032). Result not changed.
14:57:15 01/05/2006 Creating AD user account in container/OU 'LDAP://CN=Users,DC=tools4ever,DC=local2'. Boolean parameter 'Store password using reversible encryption'=FALSE (101033). Result not changed.
14:57:15 01/05/2006 Creating AD user account in container/OU 'LDAP://CN=Users,DC=tools4ever,DC=local2'. Boolean parameter 'Smart card is required for interactive logon'=FALSE (101035). Result not changed.
14:57:15 01/05/2006 Creating AD user account in container/OU 'LDAP://CN=Users,DC=tools4ever,DC=local2'. Boolean parameter 'Account is trusted for delegation'=FALSE (101036). Result not changed.
14:57:15 01/05/2006 Creating AD user account in container/OU 'LDAP://CN=Users,DC=tools4ever,DC=local2'. Boolean parameter 'Account is sensitive and cannot be delegated'=FALSE (101037). Result not changed.
14:57:15 01/05/2006 Creating AD user account in container/OU 'LDAP://CN=Users,DC=tools4ever,DC=local2'. Boolean parameter 'Use DES encryption types for this account'=FALSE (101038). Result not changed.
14:57:15 01/05/2006 Creating AD user account in container/OU 'LDAP://CN=Users,DC=tools4ever,DC=local2'. Boolean parameter 'Don't require Kerberos preauthentication'=FALSE (101039). Result not changed.
14:57:15 01/05/2006 Creating AD user account in container/OU 'LDAP://CN=Users,DC=tools4ever,DC=local2'. Account expiration date not specified for new user 'John Smith' object.
14:57:15 01/05/2006 Creating AD user account in container/OU 'LDAP://CN=Users,DC=tools4ever,DC=local2'. User 'John Smith' successfully created.
14:57:15 01/05/2006 Creating AD user account in container/OU 'LDAP://CN=Users,DC=tools4ever,DC=local2'. Password set for new user object 'John Smith'.
14:57:15 01/05/2006 Creating AD user account in container/OU 'LDAP://CN=Users,DC=tools4ever,DC=local2'. Flag 'User Cannot Change Password' not changed from default value (FALSE).
14:57:15 01/05/2006 Form message: '01/05/2006,14:57:14,T4ELOC2\Administrator,"Automation run script",OK,CreateAccount'
|