Query Application Block Group Policy

The Query Application Block has an interface to Active Directory Group Policy Management. The Query Application Block has implemented this Manageability feature for queries.

With these manageability features you can define a special policy for Queries and set WMI Filters. With a group policy you can prevent users from changing their local Query Application Block configuration settings, alternatively you might have several desktop applications deployed throughout your organisation and need to change a data store across the board.

Configuring your applications to use Group Policy requires the use of the Manageable ConfigurationSource this determines what appears in your policy by providing an ADM Template generator. Configure the Manageable ConfigurationSource first then click on Generate ADM Template from the Manageable ConfigurationSource context menu. Whatever you have configured in the Console will be turned into a template that you can use in the Group Policy Management tool. In the case of the Query Application Block the ADM template will include all of the configured Queries, ParameterSets, Custom Commands and their properties. See the documentation that comes with the Enterprise Library 4.1 for more details.
Note: If you are using a Windows Server 2008 Active Directory then all policy templates are now in an XML format with an extension of .admx. The Enterprise Library v4.1 exports policy templates in the older .adm format. These are still supported and the only change is where you find things in the Group Policy Editor. The following instructions are based on a Windows Server 2008 network with Windows Vista clients.

Generating an ADM Template

Creating a Query Application Block Group Policy

Carry out the following steps to create a Query Application Block Group Policy:
  • Use the Manageable ConfigurationSource to configure your application
  • Generate an ADM Template from the Configuration Console
  • Load the Group Policy Management Tool
  • Open up the domain that you wish to add the policy to
  • Add a new group policy to the Group Policy Objects branch and give your policy a name
Adding a Query Application Block Group Policy
  • Now right click on your new policy and click on Edit... The Group Policy Management Editor will appear.
  • From the Policies|Administrative Templates branch for either the Computer or User configuration settings, right click and select Add/Remove Templates...
Adding an ADM Template
  • Now go and find the ADM template that you created earlier and select it. Remember both .admx and .adm files are supported.
Selecting an ADM Template

You end up with additional entries in the Application branch. The Query Application Block manageability interface will add Query entries to mirror all of the configurable properties required for the Query Application Block. Note: the screenshot here shows a Windows Server 2008 Active Directory so .adm policies will be found under the Classic Administrative Templates (ADM) branch.

New Application Entries in Group Policy

Editing the Query Application Block Group Policy

Now that you have added your ADM template to the Group Policy you can edit the settings. These are, of course, the same settings as you configure using the Enterprise Library Configuration Console only now you are using the Group Policy editor.

To edit those settings you perform the following steps:
  • Load the Group Policy Management Tool
  • Open up the domain that you added your policy to
  • Now right click on your policy from the Group Policy Objects branch and click on Edit...
  • The group policy editor will appear containing the additional entries added from your ADM Template. These will reside under the Administrative Templates|Application, for a Windows Server 2003 AD, or Administrative Templates|Classic Administrative Templates|Application, for a Windows Server 2008 AD, branch in either the Computer or User configuration settings branch depending on which of those branches you added the template to (it could be both).
  • As you open up the branches from your template you will find configuration settings.
Query Configurable Settings
  • Double click on any setting and a configuration editor will appear. In order to edit a setting you will need to enable it first, then you will see the current setting and will be able to change it to what you want it to be. In the following example we are editing a query with an instance name of Read Basic1:
Group Policy Configuration Editor

Now all computers (or users) in the domain that hosts the policy will have their Query Application Block configuration automatically modified for any query instance names that match the ones in the group policy template. In the example above this would mean any query instance named Read Basic1.

Last edited Dec 21, 2009 at 2:10 PM by ewdev, version 6

Comments

No comments yet.