Read the earlier blog http://insidebes.blogspot.com/2010/05/besuseradminclient-key-to-automation.html to get into the basics of this tool.
Anyways, here is my humble effort to organize the power of BESUserAdminClient into specific group of tasks. In today's blog I will only concentrate on the tasks that an administrator performs to do user and device management. This tool also has limited support to perform these operations on multiple users, but let's keep it for another blog.
First things first. Let's start by making sure that BESUserAdminClient is up and working.
BESUserAdminClient.exe -n my_BASServer -username my_BESadmin -password my_password -ad_auth -domain Galaxy.Lab -status
BESUserAdminClient.exe -n my_BASServer -username my_BESadmin -password my_password -ad_auth -domain Galaxy.Lab -status
if you are using BAS authentication use it as below
BESUserAdminClient.exe -n my_BASServer -username my_BESadmin -password my_password -bas_auth -status
User provisioning and de-provisioning.
Let us go through some of the user provisioning and removal process using this tool.
- Adding a user User1@galaxy.lab to the BES Server.BESUserAdminClient.exe -n my_BASServer -username admin -password my_password -ad_auth -domain galaxy.lab -u user1@galaxy.lab -b my_Server_instance -add
Note: -b parameter is the name of the BlackBerry Enterprise Server instance. If you get an error message "Cannot find Dispatcher Instance:" then surely the issue is with the -b parameter. For more information read the following blog http://insidebes.blogspot.com/2010/06/besuseradminclient-cannot-find.html
- Add a user that sets a random password for Enterprise Activation and emails it to the user.
BESUserAdminClient.exe -n my_BASServer -username admin -password my_password -ad_auth -domain galaxy.lab -b my_Server_instance -u User1@galaxy.lab -add -wrandom
You can also use -w password -wt 48 to set a specific password and expiration hime in hours - Add a user and add it to a group as well as an IT Policy.BESUserAdminClient.exe -n my_BASServer -username admin -password my_password -ad_auth -domain galaxy.lab -b my_Server_instance -add -u User1@galaxy.lab -group grp1 -it_policy "new IT Policy"
- Delete a user.
BESUserAdminClient.exe -n my_BASServer -username admin -password my_password -ad_auth -domain galaxy.lab -b my_Server_instance -u user1@galaxy.lab -delete
You can also use -force to delete a user even if user mailbox is not found.
User maintenance tasks.
Under this section I will try to introduce some basic administrative tasks performed on a BES user, that could also be accomplished with this too.
- Find a user
BESUserAdminClient.exe -n my_BASServer -username admin -password my_password -ad_auth -domain galaxy.lab -b my_Server_instance -u User1@galaxy.lab -find - Move a user
BESUserAdminClient.exe -n my_BASServer -username admin -password my_password -ad_auth -domain galaxy.lab -b my_Server_instance -u user1@galaxy.lab -move -b my_Source_Server_instance -t my_target_Server_instance
To find the instance name of source and target server follow this link
- Resend Service Book.
BESUserAdminClient.exe -n my_BASServer -username admin -password my_password -ad_auth -domain galaxy.lab -b my_Server_instance -u User1@galaxy.lab -resend_service_book - Set Redirection on a specific folder.
BESUserAdminClient.exe -n my_BASServer -username admin -password my_password -ad_auth -domain galaxy.lab -b my_Server_instance -u user1@galaxy.lab -set_folder_redirection -foldername my_Folder -er - Enable redirection.
BESUserAdminClient.exe -n my_BASServer -username admin -password my_password -ad_auth -domain galaxy.lab -b my_Server_instance -add -u User1@galaxy.lab -change -er
use -dr for disable
- Resend Service Book.
BESUserAdminClient.exe -n my_BASServer -username admin -password my_password -ad_auth -domain galaxy.lab -b my_Server_instance -u User1@galaxy.lab -resend_service_book - Set Redirection on a specific folder.
BESUserAdminClient.exe -n my_BASServer -username admin -password my_password -ad_auth -domain galaxy.lab -b my_Server_instance -u user1@galaxy.lab -set_folder_redirection -foldername my_Folder -er - Enable redirection.
BESUserAdminClient.exe -n my_BASServer -username admin -password my_password -ad_auth -domain galaxy.lab -b my_Server_instance -add -u User1@galaxy.lab -change -er
use -dr for disable - Assign Static Agent 299 to the user
BESUserAdminClient.exe -n my_BASServer -username admin -password my_password -ad_auth -domain galaxy.lab -b my_Server_instance -add -u User1@galaxy.lab -assign_static_mailbox_agent 299
You can also use -clear_static_mailbox_agent to remove the user from static agent. - Delete pending messages
BESUserAdminClient.exe -n my_BASServer -username admin -password my_password -ad_auth -domain galaxy.lab -b my_Server_instance -add -u User1@galaxy.lab -purge_pending_message - Adding the user to a group named grp1
BESUserAdminClient.exe -n my_BASServer -username admin -password my_password -ad_auth -domain galaxy.lab -b my_Server_instance -u User1@galaxy.lab -change -group grp1
using -Cgroup deletes the user from the group - List the groups in the BlackBerry domain
BESUserAdminClient.exe -n my_BASServer -username admin -password my_password -ad_auth -domain galaxy.lab -list -groups - List all the folders on the user's mailbox and their redirection state.
BESUserAdminClient.exe -n my_BASServer -username admin -password my_password -ad_auth -domain galaxy.lab -u user1@galaxy.lab -folders - List the Enterprise Activation Status of the user.
BESUserAdminClient.exe -n my_BASServer -username admin -password my_password -ad_auth -domain galaxy.lab -u User1@galaxy.lab -eastatus
you can also use -from and -to sub parameter to filter the result based on date.
Device management tasks.
- Set Password "my_password" on the device for user User1@galaxy.labBESUserAdminClient.exe -n my_BASServer -username admin -password my_password -ad_auth -domain galaxy.lab -u user1@galaxy.lab -b my_Server_instance -set password my_password
- Set the owner info on the device.
BESUserAdminClient.exe -n my_BASServer -username admin -password my_password -ad_auth -domain galaxy.lab -b my_Server_instance -u User1@galaxy.lab -set_owner_info -info "InsideBES Administrator"
You can also use -infofile file.txt where file.txt has the user information. - Kill the device - Delete all the data on the handheld.BESUserAdminClient.exe -n my_BASServer -username admin -password my_password -ad_auth -domain galaxy.lab -b my_Server_instance -add -u User1@galaxy.lab -kill_handheld
- Send an Email or PIN to the device.
BESUserAdminClient.exe -n my_BASServer -username admin -password my_password -ad_auth -domain galaxy.lab -b my_Server_instance -u user1@galaxy.lab -send_email -subject "Message from InsideBES Admin" -body "Welcome to my blog"
You can also use -send_PIN. Very helpful when email infrastructure is having issues. - List applications on device.
BESUserAdminClient.exe -n my_BASServer -username admin -password my_password -ad_auth -domain galaxy.lab -b my_Server_instance -u User1@galaxy.lab -handheld_info -apps
This is a powerful command that gets the details of all the applications installed on the device.
You can also use -appname and -appsfull. Refer to RIM documentation for more detail. - Retrieving the device statistics.
BESUserAdminClient.exe -n my_BASServer -username admin -password my_password -ad_auth -domain galaxy.lab -b my_Server_instance -u User1@galaxy.lab -handheld_info -hhstats
I have personally used all of these commands sucessfully, however there is always a possibility of a human error. If so please leave your thoughts in the comment. I will confimr and update this document.
In the next blog I will try to organize my thoughts on Server Management and bulk management.
Looking forward for your comments.