Pretty good.
I have similar routines to do this for remote wipe, deleting user, purge pending, setting EAP, moving, setting IT Policy etc.
But using the BESRK to find user is too slow a call. I use one line aliases that in turn use OSQL to get the info based on either SMTP or LegacyExchangeDN.
so I usually have a list of SMTP or LEDNs on the clipboard and have a big for loop reading the clipboard and pulling them off.
For say adding user... it checks address for proper BES environment based on domain and if SMTP not LEDN it verifies we have primary SMTP. Then as some of the larger domains have data centers elsewhere that we do not manage users for, it verifies by OU and Exchange server, and then verifies not disabled or hidden, checks a few other AD attributes, adds user via BESUserAdminClient call. Verifies adds by OSQL calls after all batched added and a slight delay to give time to process. Then it emails a custom activation email with EAP, exact date/time of EAP expiration, links to activation guides etc.
|