{"id":341,"date":"2019-05-22T09:12:35","date_gmt":"2019-05-22T09:12:35","guid":{"rendered":"http:\/\/172.23.1.43\/?p=341"},"modified":"2022-06-07T22:36:16","modified_gmt":"2022-06-07T22:36:16","slug":"deep-dive-admx-ingestion-on-windows-10","status":"publish","type":"post","link":"https:\/\/blog.n-dol.org\/2019\/05\/22\/deep-dive-admx-ingestion-on-windows-10\/","title":{"rendered":"Deep Dive – ADMX Ingestion on Windows 10"},"content":{"rendered":"\n
As I have solved the issue on ingesting the Office16.admx<\/a>, I thought I would review the whole ingestion process to help understand how it works under the hood and how to manage it.<\/p>\n\n\n\n Since Windows 10 1703, ADMX can be ingested and processed by the MDM layer via the policy CSP with the URI <\/p>\n\n\n\n For this article, I will use ADMX files that I have created for each situation. The name of the example application is CamilleApp<\/strong> and published by DebayCorp<\/strong> company.<\/p>\n\n\n\n\n\n\n\n The ADMX Install URI has 3 configurable settings:<\/p>\n\n\n\n AppName:<\/strong><\/span> <\/strong>Name of the Application targeted by this ADMX. Depending what you are targeting it should be unique to the application in case to cater for multiple version of the same application. ADMX Area:<\/strong><\/span> <\/strong>There are 2 areas which ADMX ingestion covers; which are Policy and Preference. UniqueID:<\/span><\/strong> This parameter is unique to the ADMX installation, it is only used at the installation. Policy Manager uses it for versioning in case of update, more detail below. The ADMX Install URI, follows LocURI format, you should stick to alphanumeric characters ( Finally, as described in my previous article on Office<\/a>, there are some limitations on the ingestion process. I’ve coded a PS script to validate the ADMX against these limitations. the ingested policies are not allowed to write to locations within the System<\/strong>, Software\\Microsoft<\/strong>, and Software\\Policies\\Microsoft<\/strong> keys, except for the following locations:<\/p> The import process require 2 steps.<\/p>\n\n\n\n Step 1 – Create the URI<\/strong><\/p>\n\n\n\n The URI must be created for each ADMX you want to import. Step 2 – Build the SyncML<\/strong><\/p>\n\n\n\n The SyncML is a standard SyncML with the ADMX escaped to avoid any interference between the ADMX format and the SyncML format. Note<\/strong>: Anything before Generic SyncML:<\/p>\n\n\n\n To validate that the ingestion has processed correctly, you can have a look in the Windows Event Viewer<\/strong> at Applications and Services Logs > Microsoft > Windows ><\/em> Microsoft-Windows-DeviceManagement-Enterprise-Diagnostics-Provider > Admin<\/em><\/strong> Policy Manager is responsible for ingesting the ADMX sent over SyncML. There are 2 places where Policy Manager stores the information, the registry and locally.<\/p>\n\n\n\n Policy Manager store in AdmxDefault<\/strong><\/em>: Contains the settings from the ADMX itself, with where each settings apply on which registry key, take note of the AdmxInstalled<\/strong><\/em>: Contain the URI received by Policy Manager from SyncML sent by the MDM server.<\/p>\n\n\n\n ADMX files, once ingested, are stored in the Policy Manager folder located in An ADMX is specific to an application or a set of applications; should these applications get new features, there may be a requirement to extend or update. In this example, the ADMX has been updated to add Step 1 – Create the URI<\/strong><\/p>\n\n\n\n The inital URI used for the initial import the ADMX was<\/p>\n\n\n\n The unique ID needs to be modified, again the unique ID can be anything, here I’m going to use Step 2 – Build the SyncML<\/strong><\/p>\n\n\n\n The SyncML is again using SyncML:<\/p>\n\n\n\n The registry was updated with the new setting In terms of local files, Sometimes, it may happen that the ADMX is not complete and only contains some settings. Policy manager will still ingest but only update or create the corresponding settings.<\/p>\n\n\n\n In this example, the ADMX add Step 1 – Create the URI<\/strong><\/p>\n\n\n\n The last URI used for the import the ADMX was<\/p>\n\n\n\n The unique ID needs to be modified, again the unique ID can be anything, here I’m going to use Step 2 – Build the SyncML<\/strong><\/p>\n\n\n\n SyncML:<\/p>\n\n\n\n The registry was updated with the new setting Updating an ADMX is quite straight forward, the use of unique ID allows correct updates and helps Windows to map the settings against the correct ADMX, that’s why only We understood that the node UniqueID is used for uniqueness of each setting, so it make sense to not have the In the ADMX install URI, we have 2 nodes which allow Remember that the area can be The first things to know about deleting an ADMX from a machine, is that any settings applied have to be removed before trying to delete the ADMX<\/span>. Policy manager will generate a 851 error in the logs (at Applications and Services Logs > Microsoft > Windows ><\/em>Microsoft-Windows-DeviceManagement-Enterprise-Diagnostics-Provider > Admin<\/em><\/strong>) to notify of this issue.<\/p>\n\n\n\n The same way we have proceed from Install<\/strong> and Update<\/strong>, this process is executed in 2 steps, agreeing that you have deleted the settings before hand. In this example, I’m going to delete the Policy<\/strong><\/em> part of the application.<\/p>\n\n\n\n Step 1 – Create the URI<\/strong><\/p>\n\n\n\n Step 2 – Build the SyncML<\/strong><\/p>\n\n\n\n The registry shows the app as we only have deleted the Policy part of it, so if a Preference policy was defined, it would not be impacted and still be on the device.<\/p>\n\n\n Same as the registry, the application folder is still here but the Policy folder had been removed.<\/p>\n\n\n While Modern Management rely on CSPs for configuration. Third party applications still use ADMX files. ADMX ingestion provide a way of managing applications directly in CSP without no additional requirements. This provides an easy way for admins and enterprises to migrate GPOs and maintain these ADMX over the air.<\/p>\n\n\n\n Sources :<\/p>\n\n\n\n As I have solved the issue on ingesting the Office16.admx, I thought I would review the whole ingestion process to…<\/p>\n","protected":false},"author":5614970,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2157457,38600,1986749,672890795],"tags":[722452,672890813],"_links":{"self":[{"href":"https:\/\/blog.n-dol.org\/wp-json\/wp\/v2\/posts\/341"}],"collection":[{"href":"https:\/\/blog.n-dol.org\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.n-dol.org\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.n-dol.org\/wp-json\/wp\/v2\/users\/5614970"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.n-dol.org\/wp-json\/wp\/v2\/comments?post=341"}],"version-history":[{"count":37,"href":"https:\/\/blog.n-dol.org\/wp-json\/wp\/v2\/posts\/341\/revisions"}],"predecessor-version":[{"id":1423,"href":"https:\/\/blog.n-dol.org\/wp-json\/wp\/v2\/posts\/341\/revisions\/1423"}],"wp:attachment":[{"href":"https:\/\/blog.n-dol.org\/wp-json\/wp\/v2\/media?parent=341"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.n-dol.org\/wp-json\/wp\/v2\/categories?post=341"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.n-dol.org\/wp-json\/wp\/v2\/tags?post=341"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}.\/Device\/Vendor\/MSFT\/Policy\/ConfigOperations\/ADMXInstall\/<\/code><\/pre>\n\n\n\n
ADMX Ingestion<\/h1>\n\n\n\n
The ADMXInstall URI<\/h2>\n\n\n\n
...\/ConfigOperation\/ADMXInstall\/{AppName}\/{Area}\/{UniqueID}<\/code><\/pre>\n\n\n\n
Operation supported : Add<\/code>,
Get<\/code>,
Delete<\/code>
Example: Office 2016 and Office 2013 should be Office2016 and Office2013<\/p>\n\n\n\n
Policy<\/strong> is for usual GPO
Preference<\/strong> is for preference GPO
Operation supported : Add<\/code>,
Get<\/code>,
Delete<\/code><\/p>\n\n\n\n
Operation supported : Add<\/code>,
Get<\/code><\/p>\n\n\n\n
a-z<\/code>,
A-Z<\/code>,
0-9<\/code>) and may use underscore(
_<\/code>), I would advise against any other characters which can be used in URI, as this may be used in some other scenario.<\/p>\n\n\n\n
Limitation<\/h2>\n\n\n\n
ADMXValidation Script<\/a><\/p>\n\n\n\n\n
Import Process<\/h1>\n\n\n\n
Admin process<\/h2>\n\n\n\n
My application name is CamilleApp <\/i><\/b>and the ADMX target Policy<\/em><\/strong>.
For the uniqueID, we can use any value for now as this is unique to this installation. I’m going to use Version1<\/em><\/strong> for this example.<\/p>\n\n\n\n...\/ConfigOperation\/ADMXInstall\/CamilleApp\/Policy\/Version1<\/strong><\/pre>\n\n\n\n
It uses the Add<\/code> operation.<\/p>\n\n\n\n
policydefinition<\/code> need to be removed before adding it to the SyncML<\/p>\n\n\n\n
<Add>\n <CmdID>2<\/CmdID>\n <Item>\n <Target>\n <LocURI>.\/Device\/Vendor\/MSFT\/Policy\/ConfigOperations\/ADMXInstall\/CamilleApp\/Policy\/Version2<\/LocURI>\n <\/Target>\n <Data>{ADMX escaped from < > to < > }><\/Data>\n <\/Item>\n<\/Add><\/code><\/pre>\n\n\n\n
Validation<\/h3>\n\n\n\n
The ingestion process only logs when there are errors, it will tell which ADMX failed and where in the ADMX there is an issue.<\/p>\n\n\n<\/a>
<\/a>
Behind the scenes<\/h2>\n\n\n\n
Registry<\/h3>\n\n\n\n
AdmxDefault<\/code> and
AdmxInstalled<\/code>, the registry keys are located in
HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\PolicyManager\\<\/code><\/p>\n\n\n\n
<\/a>
SourceAdmxFile<\/code> with the value.<\/p>\n\n\n\n
Local Files<\/h3>\n\n\n\n
C:\\Windows\\System32\\config\\systemprofile\\AppData\\Local\\PolicyManager\\<\/code>, we can see that the name of the file is the unique ID specified in the URI initially.<\/p>\n\n\n
<\/a>
Update ADMX<\/h1>\n\n\n\n
In the GPO world, you would replace the ADMX by the new one.
For AMDX Ingestion, you install a new version on top of the previous one.<\/p>\n\n\n\nADMX Full update<\/h2>\n\n\n\n
MachineSetting3<\/code> in the
MachineSettings<\/code> area. The ADMX still contains all the previous settings in it.<\/p>\n\n\n\n
Admin Process<\/h3>\n\n\n\n
...\/ConfigOperation\/ADMXInstall\/CamilleApp\/Policy\/Version1<\/strong><\/pre>\n\n\n\n
Version2<\/code><\/p>\n\n\n\n
...\/ConfigOperation\/ADMXInstall\/CamilleApp\/Policy\/Version2<\/strong><\/pre>\n\n\n\n
Add<\/code> operation, as described before this is, with
Get<\/code>, the only operation allowed.<\/p>\n\n\n\n
<Add>\n <CmdID>2<\/CmdID>\n <Item>\n <Target>\n <LocURI>.\/Device\/Vendor\/MSFT\/Policy\/ConfigOperations\/ADMXInstall\/CamilleApp\/Policy\/Version2<\/LocURI>\n <\/Target>\n <Data>{ADMX escaped from < > to < > }<\/Data>\n <\/Item>\n<\/Add><\/code><\/pre>\n\n\n\n
Behind the scenes<\/h3>\n\n\n\n
Registry<\/h4>\n\n\n\n
MachineSetting3<\/code> and the
SourceAdmxFile<\/code> value has been also updated to
Version2<\/code> for each setting.<\/p>\n\n\n\n
<\/a>
Local Files<\/h4>\n\n\n\n
Version2<\/code> has been added.<\/p>\n\n\n
<\/a>
Partial Update<\/h2>\n\n\n\n
MachineSetting4<\/code> in the
MachineSettings<\/code> area. The ADMX does not contain all the other settings in it.<\/p>\n\n\n\n
Admin Process<\/h3>\n\n\n\n
...\/ConfigOperation\/ADMXInstall\/CamilleApp\/Policy\/Version2<\/strong><\/pre>\n\n\n\n
Version3Partial<\/code><\/strong><\/p>\n\n\n\n
...\/ConfigOperation\/ADMXInstall\/CamilleApp\/Policy\/Version3Partial<\/strong><\/pre>\n\n\n\n
<Add>\n <CmdID>2<\/CmdID>\n <Item>\n <Target>\n <LocURI>.\/Device\/Vendor\/MSFT\/Policy\/ConfigOperations\/ADMXInstall\/CamilleApp\/Policy\/Version3Partial<\/LocURI>\n <\/Target>\n <Data>{ADMX escaped from < > to < > }<\/Data>\n <\/Item>\n<\/Add><\/code><\/pre>\n\n\n\n
Behind the scenes<\/h3>\n\n\n\n
Registry<\/h4>\n\n\n\n
MachineSetting4<\/code> and
SourceAdmxFile<\/code> has
Version3Partial<\/code> for itsvalue. All other settings,
SourceAdmxFile<\/code> value remain
Version2<\/code>.<\/p>\n\n\n
<\/a>
<\/a>
Local Files<\/h4>\n\n\n
<\/a>
Recap<\/h2>\n\n\n\n
Add<\/code> operations are allowed on it and there is no
Delete<\/code>.<\/p>\n\n\n\n
Delete ADMX<\/h1>\n\n\n\n
Delete<\/code> operation on it.
As part of the lifecycle, an ADMX might need to be deleted as the application is not used anymore or some parts are not required.<\/p>\n\n\n\nDelete<\/code> operation, AppName<\/strong> and Area<\/strong> and depending on what you are trying to achieve you target one or the other.<\/p>\n\n\n\n
Policy<\/code> or
Preference<\/code>. So you can delete either of them for each application.<\/p>\n\n\n\n
<\/a><\/figure>\n\n\n\n
Admin Process<\/h2>\n\n\n\n
...\/ConfigOperations\/ADMXInstall\/CamilleApp\/Policy<\/pre>\n\n\n\n
<Delete>\n <CmdID>1<\/CmdID>\n <Item>\n <Meta>\n <Format>chr<\/Format>\n <Type>text\/plain<\/Type>\n <\/Meta>\n <Target>\n <LocURI>.\/Vendor\/MSFT\/Policy\/ConfigOperations\/ADMXInstall\/CamilleApp\/Policy<\/LocURI>\n <\/Target>\n <\/Item>\n<\/Delete><\/code><\/pre>\n\n\n\n
Behind the scenes<\/h2>\n\n\n\n
Registry<\/h3>\n\n\n\n
<\/a>
Local Files<\/h3>\n\n\n\n
<\/a>
Conclusion<\/h1>\n\n\n\n
\n\n\n\n