Thursday, October 24, 2013

Task automation with AutoMate 10

Streamlining server tasks with workflow automation is key to smoothly functioning IT administration. Derek Schauland takes a look at the new AutoMate 10 from Network Automation. 

automatelogo.jpg
Windows has come a long way in terms of the types of tasks that are possible. The task scheduler has been around for a long time and, in Windows 7 and newer, the possibilities include things like on-event task triggers, which executes a task when a particular event happens, in addition to the previous schedule triggers. 
Kicking off tasks is pretty great with the built-in application, but there are still quite a few hoops to go through (like programming or scripting) to get things to happen on remote computers. What if there were a way to automate tasks with little scripting (if any) and if this solution could accomplish things on a remote computer (or computers)? Oh and by the way, I am not talking about PowerShell, but of AutoMate 10 from Network Automation.  

 

Figure A
figure A.png

Network Automation Inc.’s AutoMate 10
The public beta of the newest version, AutoMate 10, is now available. Once the application is installed, there is not too much visible in the main screen. The tasks shown in Figure A are some of the samples included with the application. These may be a good place to generate some ideas for tasks you wish to create. The categories include:
  • Arrays
  • Automate
  • Custom Functions
  • Date and Time
  • E-Mail
  • Excel
  • File Management
  • Flow... If Then
  • FTP
  • GUI Automation
  • HTTP
  • Looping
  • Multimedia
  • Reading and Writing
  • SNMP
  • SQL
  • System Management
  • Terminal and Telnet
  • Text Manipulation
  • Triggers
  • User Input
Examining the criteria and actions created as samples should provide some guidance as to how AutoMate 10 works on a single system. To get an idea of an existing task, let’s examine the "Send an email to a list of email addresses" sample, shown in the Task Builder in Figure B.

Figure B
figure B.png

Task Builder
The Send Email task does the following:
  • Creates a variable to contain the list of email addresses – theEmailList
  • Creates another variable to contain each email address - theEmailAddress
  • Uses the GetAutomateDirectory() function to populate the path to the AutoMate installation then appends the path to the sample information
  • Reads the txt file specified and stores the values in the theEmailList variable
  • Loops through the values in theEmailList variable and stores each in theEmailAddress
  • Displays a message that will be sent to the address stored in theEmailAddress variable
  • Sends the email message using the systems configured email settings
  • Exits the loop and stops the task if all values have been read from theEmailList variable
Working with the Task Builder allows you to create a task flow by adding objects to the workflow pane of the application. In the top right pane, these collected items and comments are strung together to create the complete task. While the output appears similar to a script, there is no scripting required to work with tasks in AutoMate.
Note: Samples and tasks created in previous versions of AutoMate will be upgraded to the new AutoMate 10 format before allowing editing.
In addition, building a new task in AutoMate 10 is fairly straightforward and allows you to use a wizard to select criteria and actions for your task. To create a new task that adds a new Active Directory user complete the following steps:
  1. Select New from the AutoMate Administrator window.
  2. On the welcome screen for the task, enter a name for the task, Create AD User, and click Next.
  3. Select a trigger to start this task if desired and click Next. Creating an AD user by using a trigger might not be ideal; for now, do not select any triggers, and click Next.
  4. Click Start The Task Builder to create the actions to be performed.
  5. In the left action navigation pane, expand Active Directory and add Create User to the workspace.
  6. In the Action Properties dialog (shown in Figure C) fill in the fields to create the user account.Note: In this example, I created variables for Firstname, LastName, and Logon to allow for reuse without constantly editing the task. Also, a static password was provided with the “User Must Change Password at next logon” enabled.
  7. Once the task steps are all added, save and close the task to return to the wizard.
  8. Click next to specify if the task should run if the computer is logged off or locked.
  9. Click Next to review the configured items.
  10. Once you have reviewed the task, click Save to add the task to the administrative console.

Figure C
figure C.png

Creating an Active Directory User

Using variables

Above, I mentioned that variables were used to handle the dynamic items needed for the creation of the user object. Creating variables allows values like "Steve Smith" to be passed into the task at execution. This way, there is no need to constantly modify the task to add new users.
To create a variable from inside a task step, complete the following:
  1. Within the task creation dialog, click in the field for which you would like to create a variable.
  2. Click the % at the end of the text box to open the Expression Builder.
  3. Double-click Insert Variable at the bottom of the items list.
  4. In the Variable dialog box enter the name of the variable, an initial value (if needed) and a description and click OK.
  5. This will store the new variable in the Local Variables folder; click the folder in the navigation pane and highlight your new variable.
  6. Click Insert to add the variable to the Action form field.
  7. Repeat for other fields which may be best filled by a dynamic value.
Since we did not configure a trigger for this task, you’ll need to run it manually by selecting it in the admin console, right-clicking it, and choosing Run.

Automating tasks with triggers

Using a triggering action will allow AutoMate to watch for the condition to occur and then fire the actions outlined in the task. In the Create AD User example, you might use a file condition to show if a file exists. The file contains the names of the users being added, then the action steps can also include reading the file to populate the needed variables to complete the creation of an AD user object.
To create the file/folder based trigger for our example, complete the following steps:
  1. Edit the existing task by double clicking the item in AutoMate 10.
  2. Select Edit Triggers.
  3. Scroll to the bottom of the triggers window and click add Note: If you selected a trigger when initially creating the task, it should be listed in the available triggers window.
  4. Select File System as the type of trigger to add.
  5. Enter a path to a folder that should be watched (C:\folder\).
  6. Expand Prerequisites and select File added to watch for files added to the specified directory.
  7. Expand the filters area of the dialog.
  8. Enter the name of the file to watch for as an include mask – I used users.txt.
  9. Expand Users to enter credentials which may be needed for this trigger to work, this will depend on your environment.
  10. Expand behavior and ensure Enable Trigger is checked, also it may be advantageous to specify trigger on startup if condition is true to ensure the task can be run if the file exists when AutoMate 10 starts.
  11. Click Update to save the trigger(s).
Now when a file named users.txt is added to c:\folder (or the path you specify) this task will be triggered.

Remote actions

Tasks can have remote triggers and remote actions to help you manage remote systems. While this method works for smaller environments Network Automation also produces a server product that can be used for workflow automation and management of larger enterprise environments.

Does AutoMate 10 replace Windows Task Scheduler?

I think if you are going to purchase the licensing for AutoMate it can certainly be a replacement for the built-in Task Scheduler. The point and click nature of the application creates a much broader array of tasks than are available in the built-in task management solution. Another thing to keep in mind is that the solution requires no coding to be successful.  All of these things make it much more accessible while retaining the full-featured functionality.
AutoMate 10 comes with a 30-day free trial. Contact Network Automation for more detailed licensing and cost details.
For an organization that is moving down a mostly automated path to administration, the cost to entry may be worth it. The number of possibilities and things that can be accomplished with AutoMate are outstanding and for organizations of any size hoping to do more with less the free trial is definitely worth checking out.

0 comments:

Post a Comment

Appreciate your concern ...