Tools4Ever’s Product Downloads Below.
Download User Management Resource Administrator > Download
Download Self Service Password Reset Manager SSRPM > Download
If you want to learn the basics on how to connect to UMRA with its COM object, please see my original post on “Basics of UMRA COM”.
If you haven’t already take a look at my blog on how to get
UMRA Automation projects locked down with some very flexible and extensive Error Handling. Click here >
http://activedirectoryadmin.blogspot.com/2009/07/umra-active-directory-automation-error.html That blog will give you an idea of how to put Error Logic into your
UMRA Automation projects. However, this blog post will be on how to check for erros when you are performing some type of action on through a
UMRA web portal. We all know that sometimes you will get errors for performing an action, it can be something as simple as missing information, however that should be handled on the front end, but just in case, you want to make sure you kick some type of error message back, it can be something small as “Error”, or something complex telling the user what the error was. For example, I recently created an Intranet Portal for a large wireless company. When they created users, if for some reason there was an error creating the user, I was kicking back a message that just says “Error Creating User” however, they needed much more information than that, so I was able to build some better error handling into my project kicking back an error message such as “Wrong OU Path”, “Firstname / Lastname already in use”, and even “AccountName already in use”. With these types of error messages, you can now have a more user-friendly portal, and give more logical error messages to the end user. Now, some of you might be asking, how you get started adding some error logic to your script, well read below to find out how.
When you create a new
UMRA Automation project, the first thing you should do is add a few actions to your script, I will always pull over a new variable actions, and call it %errorflag% and set its value to 0. I then pull over a few labels and just call them “Error” and “End Script”. If I throw an error anywhere on any of my actions such as creating a user, creating a mailbox, creating a home drive or folder, etc. I will then drop down to the “Error” label, and update my %errorflag% to 1. Now in your .asp PHP .NET etc web portal, check the value of %errorflag% if its = to 0 then there were no errors, however, its its = 1, you know you threw and error. Below is a screen shot of how you can integrate this into your
UMRA Automation scripts.
0 comments:
Post a Comment