Exporting an IT Policy – Part 2

In the previous post I wrote about using the BlackBerry IT Policy Import and Export Tool for exporting BlackBerry IT policies.

The second way to export an IT policy is to use the BES User Admin Client tool (BESUserAdminClient.exe). This tool allows you to export a policy to a comma separated file.

First you can list the existing IT policies by:

BESUserAdminClient.exe -ad_auth -username MyUserName -domain MyDomain -password MyPassword -list -it_policies

Explanation:
-list : the command for listing
-it_policies : list the available IT policies

In the above example I use AD Authentication to connect to the BlackBerry Administration Service. The command will generate a result similar to this:

BlackBerry(R) Enterprise Server User Administration Tool Version 5.0.4.6
Copyright (c) Research In Motion, Ltd. 2009-2012. All rights reserved.

(11/30 10:42:16) Running command…
(11/30 10:42:16) …Done
(11/30 10:42:16) Command Results:

Policy Name
Default
Basic Password Security
Medium Password Security
Advanced Security
Medium Security with No 3rd Party Applications
Advanced Security with No 3rd Party Applications
Individual-Liable Devices
< .. removed for brevity .. >

You can export a specific policy by using the the following command:

BESUserAdminClient.exe -ad_auth -username MyUserName -domain MyDomain -password MyPassword -list -it_policy_rules -it_policyMedium Password Security”  -o MediumPasswordSecurity.csv

Explanation:
-list : the command for listing
-it_policy_rules : list IT policy rules
-it_policy : specify the policy to be listed
-o : specify the output file

So with the above command you list the policy rules in the Medium Password Security IT policy and write the output to a file called MediumPasswordSecurity.csv.

Running the command will generate output simlar to below:

BlackBerry(R) Enterprise Server User Administration Tool Version 5.0.4.6
Copyright (c) Research In Motion, Ltd. 2009-2012. All rights reserved.

(11/30 10:46:22) Running command…
(11/30 10:46:40) …Done
(11/30 10:46:40) Writing results to output file: MediumPasswordSecurity.csv

When you take a look into the generated file you will find the IT Policy rules which make up the policy in a comma separated format.

A sample of the generated export file:

Policy Name,Policy Group,Rule Name,Rule Value,Rule Type
Medium Password Security,Device only,User Can Disable Password,No,BOOLEAN
< .. removed for brevity .. >
Medium Password Security,Device only,User Can Change Timeout,Yes,BOOLEAN
Medium Password Security,Device only,Password Required,Yes,BOOLEAN