Freeware adm2html Tool
is a command line tool that reads the information contained in an ADM template file and generates a corresponding HTML document with variable sorting criteria.At sepago we needed to create documentation of the settings that can be influenced with the ADM template file used for Citrix’s User Profile Manager (UPM). Because of the structure of ADM template files, to do so by hand would require a lot of copying and pasting which gets tedious very fast. Also once an ADM template file reaches a certain size it becomes impossible to extract all the data by hand in a reasonable amount of time. An example of a very big ADM template file is system.adm used by Windows. On my XP machine it is 1.9 MB big and has about 13.500 lines of text. Given these numbers it’s clear that using copy and paste to extract the data included in a file of that size is not feasible anymore. The idea of a tool that offers an easy and fast way to generate a HTML document describing all the policy settings in an ADM template file emerged.
What’s an ADM template
ADM template files are text files that are used to apply configurations and policy settings to a set of targeted users and computers within an Active Directory service environment. They are used to describe where registry-based policy settings are stored in the registry and enable administrators to view policy settings in the Group Policy Object editor. Because ADM template files cannot be read comfortably by humans, adm2html offers a way to generate an easily readable HTML description of the data stored in an ADM template file.
How does the tool work
As already mentioned at the beginning of this article, we needed to document the settings of User Profile Manager, but didn’t want to spend too much time on this task. This lead to the development of adm2html, a command line tool that reads the information contained in an ADM template file and generates a corresponding HTML document. The HTML document includes all the data of the ADM template file in a human-readable format. The HTML output can be generated using one of four output modes. Each of these modes groups and sorts the policies in a different way. The HTML output is generated using a set of HTML template files. Each HTML template file is used to describe a different element found in ADM template files. The tool takes the HTML template files and dynamically combines them depending on the data read from the ADM template file. Each HTML template file has variable fields that are replaced with the actual data read from the ADM template file or with the contents of another HTML template file. The user has to provide a style sheet in CSS format that is incorporated into the HTML output to influence its appearance. Additionally the HTML template files can be customized by the user to change the structure of the HTML output, if desired.
Different output modes
Four output modes are available. All of them divide the policies described in the ADM template file into two groups, CLASS MACHINE and CLASS USER. CLASS MACHINE holds all policies pertaining to a machine while CLASS USER holds all policies related to single users. The listing of the policies in each group depends on the actual output mode chosen. The available output modes are:
Output mode 0: This output mode groups the policies within each of the two classes alphabetically by the name of the category they are situated in. Within each category the policies are listed alphabetically by their name. For each policy a table describing all data pertaining to the policy is listed.
<>Output mode 1: The policies of each class are grouped by the first letter of their name. Under each letter the policies are listed alphabetically by their whole name. A table holding its data is provided for each policy.
Output mode 2: Policies of each class are grouped by the registry key they use. Under each registry key the policies are listed alphabetically by their name. A table holding the data is included with each policy.
Output mode 3: This output mode groups the policies of each class by the string read from their supported tag. This tag informs the administrator of the platforms or applications for which the policy is supported. This can be a Windows service pack for instance. Under each such string the policies are listed alphabetically by their name. A table holding its data is provided for each policy.
To demonstrate what the HTML output for each of the four output modes looks like, I took the ADM template file used with Citrix’s ICA-Client and generated a HTML document using each mode. The ADM template used as input can be found here. The output for each mode is mode0, mode1, mode2 and mode3.
Another real world example is the one which was the reason why we coded this tool – the ADM template description for User Profile Manager V2. Here is the original ADM template. You can see the output result using the default settings here.
adm2html provides the user with the ability to quickly generate a HTML description of the policies described in an ADM template file. What would require copying and pasting a lot of data by hand can now be done in a matter of seconds with this easy to use and free tool.