The Blackberry Enterprise Server resource kit has several handy utilities, one of them is the besuseradminclient.
The tool has an extensive listing of all the available commands however the documentation does not provide some examples to get you going.
This first post is about authentication against the BlackBerry Administration Service (BAS) which will execute your commands submitted via the besuseradminclient. To be able to run the besuseradminclient you have to provide credentials, with sufficient administrative privileges, to the BAS you are running the tool against.
There are two types of authentication, BAS authentication with the accounts specified in the BES database and Active Directory integrated authentication.
With Active Directory based accounts you use the ad_auth switch, for example running the status command:
BESUserAdminClient.exe -ad_auth -username your_ad_username -domain your_ad_domain -password your_ad_password -status
You have to specify the Active Directory domain in the legacy way, i.e. DOMAIN, not domain.local.
For accounts specified in the BES database you use the bas_auth switch, for example:
BESUserAdminClient.exe -bas_auth -username your_bas_username -password your_bas_password -status