Configure 25 free-form local Windows device attributes through Microsoft Intune using an imported ADMX policy.
Current release: v1.0.0
Intune Local Device Attributes provides a simple device-wide context layer for scripts, applications and remediations. Your organization decides what every attribute means and which values are allowed.
The administrative template exposes 25 independent machine policies:
- Custom Attribute 01
- Custom Attribute 02
- ...
- Custom Attribute 25
Each enabled policy accepts a free-form text value. Values are stored as REG_SZ under:
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\IntuneLocalDeviceAttributes
Example:
Attribute01 = Contoso
Attribute02 = MultiUser
Attribute03 = FrontOffice
The names and examples are intentionally generic. You can use the attributes for customer codes, device roles, locations, environments, deployment variants or any other local decision your automation needs.
Some scripts need to know what a device is intended for before they run. Native Intune properties do not always provide that business context locally. These attributes make centrally managed context available in the Windows registry without requiring a script to query Microsoft Graph.
Typical use cases include:
- Scoping a Win32 app with a requirement script
- Selecting an application configuration variant
- Including or excluding a device from remediation logic
- Adding centrally managed context to local diagnostics
- Selecting a maintenance or deployment ring
For Microsoft's complete import procedure and current platform limitations, see
Import custom ADMX and ADML administrative templates into Microsoft Intune.
Microsoft currently documents this feature as public preview and supports only
en-US ADML language files.
- Open the Microsoft Intune admin center.
- Go to Devices > Manage devices > Configuration.
- Open Import ADMX.
- Import
PolicyDefinitions/IntuneLocalDeviceAttributes.admx. - Upload
PolicyDefinitions/en-US/IntuneLocalDeviceAttributes.admlwhen requested. - Create a configuration profile for Windows 10 and later using Templates > Imported Administrative templates.
- Configure one or more attributes and assign the profile to a device group.
The settings are located under Intune Local Device Attributes > Attributes.
Directly from the registry:
$customerCode = Get-ItemPropertyValue `
-Path 'HKLM:\SOFTWARE\Policies\IntuneLocalDeviceAttributes' `
-Name 'Attribute01'Or use the included helper:
. .\PowerShell\Get-IntuneLocalDeviceAttribute.ps1
Get-IntuneLocalDeviceAttribute -Number 1
Get-IntuneLocalDeviceAttributeThe second command returns all configured attributes.
- Policies apply in the device context.
- Enabling a policy writes its text value to the registry.
- Changing a configured value updates the existing registry value without requiring a restart.
- Setting a policy to Disabled or Not configured removes the corresponding registry value.
- Unconfigured attributes are not created.
- Empty values are rejected by the Intune configuration interface.
- Each attribute accepts up to 1,023 characters. Values of that length are written completely and unchanged.
- Spaces, punctuation and Unicode characters are preserved.
- The same attributes are visible from both 32-bit and 64-bit PowerShell.
- Removing a profile assignment or deleting the profile removes the values managed by that profile. If no values remain, Windows also removes the registry key.
- If two profiles configure the same attribute with different values, Intune reports a conflict and the conflicting registry value is removed. Other non-conflicting attributes remain applied.
- Attribute values are local data and are not automatically added to Intune inventory.
- Intune assignment filters and Microsoft Entra dynamic groups cannot directly evaluate these registry values.
- Do not store passwords, tokens or other secrets in these attributes.
Device-scoped attributes have been observed to become available during the Enrollment Status Page device setup phase and before tested device-targeted Win32 applications were installed. Intune does not document a guaranteed processing order between an imported ADMX profile and a Win32 app. Applications should therefore handle a temporarily missing attribute cleanly.
They are stored as REG_SZ values named Attribute01 through Attribute25 under:
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\IntuneLocalDeviceAttributes
The existing registry value is updated after the device processes the new policy. A restart is not required.
No. The Intune configuration interface requires a value and prevents saving an empty field.
The corresponding registry value is removed. Other configured attributes under the same key remain present.
After the device processes the removal, the values managed by that profile are removed. If no values remain, the registry key is also removed.
The cleanup behavior is the same as removing its assignment: its managed values are removed and an empty registry key is removed as well. Testing did not show policy tattooing during normal profile removal.
If the profiles specify different values, Intune reports a conflict and Windows removes the conflicting registry value. Other attributes without a conflict remain applied. Avoid assigning conflicting values because the local value must not be treated as available while the conflict exists.
Each attribute accepts up to 1,023 characters. The Intune interface prevents saving a longer value. Testing confirmed that a 1,023-character value is stored completely and unchanged.
Yes. Testing confirmed that values containing spaces, punctuation and Unicode characters such as ÄÖÜ are preserved. Console encoding can affect how characters are displayed in a child process, but it does not change the registry value.
Yes. Testing with both 32-bit and 64-bit Windows PowerShell returned the same values from the documented registry path.
They have been observed during the ESP device setup phase before tested device-targeted Win32 applications were installed. Microsoft does not document a guaranteed processing order, so applications should handle a temporarily missing attribute.
No. These are local registry values and are not automatically added to Intune inventory. They are intended for local scripts, applications, requirement rules, remediations and diagnostics.
They technically contain arbitrary text, but they must not be used for passwords, tokens or other secrets. Local processes and users with sufficient registry access can read them.
PolicyDefinitions/
IntuneLocalDeviceAttributes.admx
en-US/IntuneLocalDeviceAttributes.adml
PowerShell/
Get-IntuneLocalDeviceAttribute.ps1
Examples/
01-Win32AppRequirement.ps1
02-SelectApplicationConfiguration.ps1
03-RemediationScope.ps1
04-SupportContext.ps1
05-MaintenanceRing.ps1
Designed for Windows 10 and Windows 11 devices managed with Microsoft Intune.
This project is licensed under the MIT License.
See CHANGELOG.md for release history.