This tool can be used to create a custom ADMX and ADML file which creates or modifies keys in the Windows Registry.
Important for Intune Imported ADMX: Registry keys under System, Software\Microsoft, and Software\Policies\Microsoft are restricted (except a small Microsoft-defined allowlist). The generator automatically skips incompatible entries and prints a warning summary in the console.
If you want to use this tool you need to:
- Add Registry Keys into
add-keys.csv:
path,type,name,value
HKEY_LOCAL_MACHINE\SOFTWARE\NIKLASRAST,STRING,Test String,SomeValue
HKEY_CURRENT_USER\SOFTWARE\NIKLASRAST,DWORD,Test DWORD,1The csv file has fields for path,type,name and value. Fill them like this example:
STRING Key:
- path: HKEY_LOCAL_MACHINE\SOFTWARE\NIKLASRAST
- type: STRING
- name: Test String
- value: SomeValue
DWORD Key:
- path: HKEY_LOCAL_MACHINE\SOFTWARE\NIKLASRAST
- type: DWORD
- name: Test DWORD
- value: 1
BINARY Key:
- path: HKEY_LOCAL_MACHINE\SOFTWARE\NIKLASRAST
- type: BINARY
- name: Test BINARY
- value: 0100000000200000020000000F024E0000000000
You can add as many keys as you need - one per line.
- Run the
New-ADMXADML.ps1script:
.\New-ADMXADML.ps1 -Name "SetTheFileName" -CSVPath "Path/To/add-keys.csv"This will do the following:
- Check if the
add-keys.csvexists in the same directory as the script. If not it will create a template csv file which you can use to add registry keys. - Create GUIDs which are internally used for the admx template.
- Ask you for the name of the admx/adml files.
- Add all registry keys that are defined inside of
add-keys.csvinto the created admx/adml files. Each key will also be logged on the console. If all messages are green then everything is OK. If you see a red line there was an issue.
- Deploy the admx/adml file
Once the files have been created you simply need to upload them to Intune as a Imported ADMX. Afterwards you can use them in a new configuration profile from the
Imported Administrative templates (Preview)type.
Before making your first contribution please see the following guidelines:
Made with ❤️ by Niklas Rast