Last Updated on November 3, 2023 by rudyooms
Today I wrote a simple blog that will be about troubleshooting one of the ADMX upload errors you could endure when uhhh uploading your own ADMX to Intune
I guess with the arrival of the possibility to upload or own ADMX files we all started to play a bit with it. A good example would be the DriveMapping ADMX I am mentioning in this blog to mount some drive letters on your AADJ device if you have the need for them.
Another possibility would be to write your own ADMX to define some additional settings you can’t configure with the Settings Catalog. When you don’t have the knowledge of how to write those ADMX files yourself I got you covered in this blog
All good right? I guess so… until you run into some weird shit!
2. The Issue
If you skipped or maybe just read the introduction, let me show the issue which I stumbled upon. Someone reached out to me by replying to the blog I mentioned above
He is mentioning the fact that when importing the ADMX he ended up with the error that the ADMX file referenced not found Namespace Missing: Microsoft.Policies.Windows. Please upload it first.
I didn’t have that issue when I was using it! Even those nice guys on the Intune Training on YouTube didn’t have that issue when they were playing around with that ADMX file
So I decided to create a new tenant because I exceeded the amount of 10 ADMX files in my own tenant and I can’t delete them anymore (24-10-2022 –> Seems to be fixed!!)
After the tenant was created I started uploading a new ADMX file I created to define some additional OneNote settings. I was asked to troubleshoot another upload error with this OneNote.admx. While uploading the ADMX I got myself another issue to fix and another blog to write!
Please Note: As shown above and as always this ADMX is calling upon Microsoft.Policies.Windows namespace. After selecting the ADMX and ADML files the upload started and I waited patiently
I waited again a minute or two but that one also failed me with the error: The Upload of this ADMX file has failed!
As shown above, that pretty much looks like the same error message we noticed earlier: ADMX file referenced not found NamespaceMissing: Microsoft.Policies.Windows. Please upload it first.
Okay? How do we start troubleshooting this specific error? As this functionality is pretty new, there isn’t much documentation written about it. First to rule out if it was an issue with this ADMX file I decided to upload the windows built-in Shell-CommandPrompt-Regedittools.admx
This ADMX file is using the same namespace as I was using: Microsoft.Policies.Windows
You can almost guess the outcome of this attempt to determine what is going on
So I guess I can assume it isn’t the ADMX but something that suddenly changed at Microsoft? Because it was working previously and I didn’t change anything with that ADMX file in the meantime.
I decided to remove the “Using Prefix=”Windows” namespace=”Microsoft.policies.windows” in the ADMX file to see what error it could give me.
As shown below, that wasn’t going to fix it I guess.. because it got me the “Sequence contains no elements” error
When taking another look at the first error I got, I guess the solution is already in there right? It’s hiding in plain sight
4. The “Stupid” fix
In the blog I wrote about creating your own ADMX files, I explained how you could test your ADMX before uploading it to Intune. To do so you needed to move the ADMX file to the c:\windows\policydefinitions folder and the ADML file to the corresponding language folder inside that policydefinitions folder
This folder is the Central Store of all the ADMX files on the Windows client. So, if the error is mentioned it is missing the Microsoft.Policies.Windows.ADMX dependency. Sounds familiar right?
I guess we need to upload and do it ourselves right?
If you open the policydefinitions folder, you will notice the Windows.Admx file. Let’s open it, shall we?
As shown above, this Windows.ADMX targets the Microsoft.Policies.Windows prefix instead of using it. So the resume: The windows.admx defines the policy: Microsoft.Policies.Windows.
I got myself a new tenant and uploaded the Windows.Admx and the Windows.ADML files first.
After waiting a couple of minutes that upload was successful and after uploading the additional ADMX I created myself, that one also was marked as available
I even could define those OneNote settings in a new device configuration profile
Even when this was just a simple little blog, I hope it will solve one of the possible errors you could get when uploading your own custom-made ADMX file. If not please reach out and I will try to solve it for you.