Friday, May 7, 2010

BESUserAdminClient - The Key to automation.

A sign of a great System Administrator is his ability to automate the daily tasks. After great success with Powershell, I turned my attention towards BlackBerry Server. In BES 5.0 RIM released API's to automate and script BlackBerry Administrative Tasks. I peeked and poked around the BAS API documentation, and finally said good bye. Though I agree that framework is solid and useful, but as an administrator who has to wear multiple hats, it was too much of an investment in time to save those GUI clicks. Real low return of investment. But for developers and companies developing BlackBerry products, this surely is a framework to look for.

I had read somewhere that the new BlackBerry Enterprise Server User Administration Tool version (BESUserAdminClient) is designed to use BAS API, so I focussed my attention to this tool one more time. Earlier, I had limited success before but the tool was never my favorite. 

Features
For those of you new to this tool, BESUserAdminClient can be used to perform user account operations like find, add, remove, move and change user configurations. It can also be used to perform BlackBerry Enterprise Server administration to gather management and monitoring information. An interesting note in the document mentions that new server options introduced in the later versions of BES will work without any update of BESUserAdminClient. But new client options will be only be available with the latest version of BESUserAdminClient.

Installation
Installation of BlackBerry Enterprise Server User Administration Tool version 5.0 Service pack 1, on Windows 7 machine was a breeze. The one and only prompt was to enter the name of BAS Server. I used the DNS name of the machine itself instead of the BAS Pool name in the DNS, so as to minimize the troubleshooting elements by excluding the BAS pool as well as any SSL certificate issues I may have. The target BlackBerry Server was also 5.0 SP1.

Earlier versions of BESUserAdminClient required a server component (running as service) and a client component. I tried to run this tool against BES 5.0 MR1 with no success.
Results
For instant gratification, I used BESAdmin Account (will all its powers) instead of following the documentation for complex role assignments. The tool also provides an option to store an encrypted set of authentication credentials, but again I used it in the command line itself. The first success after trial and error was when I typed

BESUserAdminClient.exe -n BESSERVER1 -username admin -password ZZZZZZZ -bas_auth -status
BlackBerry(R) Enterprise Server User Administration Tool Version 5.0.1.7
Copyright (c) Research In Motion, Ltd. 2009. All rights reserved.


(05/06 16:08:11) Running command...
(05/06 16:08:12) ...Done
(05/06 16:08:12) Command Results:
Property,Value
BAS Version,5.0.1.58
BAA Version,5.0.1.24
(Note - if you are using Active Directory authentication use the it as below ) 

BESUserAdminClient.exe -n 172.29.3.142 -username BESadmin -password ZZZZZZZ - domain Galaxy.LAB -ad_auth -status
)

Here are other few commands that can help you .
  • Get user information
    BESUserAdminClient.exe -n 172.29.3.142 -username admin -password ZZZZZZZ -bas_auth -find -u neptune@galaxy.lab
  • Get handheld statistics
    BESUserAdminClient.exe -n 172.29.3.142 -username admin -password ZZZZZZZ -bas_auth -handheld_info -hhstats -u neptune@galaxy.lab
  • Get Server Statistics
    BESUserAdminClient.exe -n 172.29.3.142 -username admin -password ZZZZZZZ -bas_auth -handheld_info -stats -service -b BES01_instance_name
  • Get the list of applications installed on devices.
    BESUserAdminClient.exe -n 172.29.3.142 -username admin -password ZZZZZZZ -bas_auth -handheld_info -hhstats -apps -u neptune@galaxy.lab
Coming up
In my next blog I plan to write about following group of operations that could be performed by this tool.
Enjoy the blog. Hope this will serve as a good start.

    1 comment:

    1. •Get the list of applications installed on devices.
      BESUserAdminClient.exe -n 172.29.3.142 -username admin -password ZZZZZZZ -bas_auth -handheld_info -hhstats -apps -u neptune@galaxy.lab

      how to dow this for bulk users ?

      ReplyDelete