Description: This is a policy {'oma_uri': {'./Vendor/MSFT/Defender/Configuration/DeviceControl/PolicyRules/%7Bb8615f3d-a41e-4c70-a70a-88e7b7aa7768%7D/RuleData': <devicecontrol.IntuneCustomRow object at 0x000002AE247A24B0>, './Vendor/MSFT/Defender/Configuration/DeviceControl/PolicyGroups/%7B9b28fae8-72f7-4267-a1a5-685f747a7146%7D/GroupData': <devicecontrol.IntuneCustomRow object at 0x000002AE24041B50>, './Vendor/MSFT/Defender/Configuration/DeviceControlEnabled': <devicecontrol.IntuneCustomRow object at 0x000002AE247A27E0>, './Vendor/MSFT/Defender/Configuration/DefaultEnforcement': <devicecontrol.IntuneCustomRow object at 0x000002AE247A2F90>, './Device/Vendor/MSFT/Defender/Configuration/DataDuplicationDirectory': <devicecontrol.IntuneCustomRow object at 0x000002AE247A2DE0>}, 'web_paths': ['windows/device/Group Policy/Any Removable Storage and CD-DVD and WPD Group.xml', 'windows/device/Group Policy/Audit File Information.xml'], 'rules': {'{b8615f3d-a41e-4c70-a70a-88e7b7aa7768}': <devicecontrol.PolicyRule object at 0x000002AE2275DEB0>}, 'groups': {'{9b28fae8-72f7-4267-a1a5-685f747a7146}': <devicecontrol.Group object at 0x000002AE24593EF0>}, 'intune_ux_support': <devicecontrol.Support object at 0x000002AE247A0E00>, 'groupsXML': '\n\t\n\t\t\n\t\tAny Removable Storage and CD-DVD and WPD Group_1\n\t\tMatchAny\n\t\t\n\t\t\tRemovableMediaDevices\n\t\t\tCdRomDevices\n\t\t\tWpdDevices\n\t\t\n\t\n', 'rulesXML': '\n\t\n\t\t\n\t\tAudit File Information\n\t\t\n\t\t\t{9b28fae8-72f7-4267-a1a5-685f747a7146}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\tAllow\n\t\t\t16\n\t\t\t16\n\t\t\n\t\n', 'mac_policy': None, 'mac_error': 'Primary ID [CdRomDevices] is not supported on macOS.', 'windows_support': <devicecontrol.Support object at 0x000002AE247A1DF0>, 'entry_type': <devicecontrol.WindowsEntryType object at 0x000002AE24590E60>, 'description': <main.Description object at 0x000002AE246E9C70>}
Device Type: Windows Removable Device
A device control policy is a combination of policy rules, groups and settings.
This sample is based on the sample files.
To configure the sample, follow the deployment instructions.
Name | Devices | Rule Type | Access | Notification | Conditions | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Included | Excluded | Disk Read | Disk Write | Disk Execute | File Read | File Write | File Execute | ||||
Audit File Information |
|
|
Allow | - | - | - | - | ✅ | - | Create file evidence without file (16) | - |
This is a group of type Device. The match type for the group is MatchAny.
Property | Value |
---|---|
PrimaryId | RemovableMediaDevices |
PrimaryId | CdRomDevices |
PrimaryId | WpdDevices |
View XML
<Group Id="{9b28fae8-72f7-4267-a1a5-685f747a7146}" Type="Device">
<!-- ./Vendor/MSFT/Defender/Configuration/DeviceControl/PolicyGroups/%7B9b28fae8-72f7-4267-a1a5-685f747a7146%7D/GroupData -->
<Name>Any Removable Storage and CD-DVD and WPD Group_1</Name>
<MatchType>MatchAny</MatchType>
<DescriptorIdList>
<PrimaryId>RemovableMediaDevices</PrimaryId>
<PrimaryId>CdRomDevices</PrimaryId>
<PrimaryId>WpdDevices</PrimaryId>
</DescriptorIdList>
</Group>
Setting Name | Setting Value | Documentation |
---|---|---|
DeviceControlEnabled | True | documentation |
DefaultEnforcement | Allow | documentation |
DataDuplicationDirectory | Enter the directory to store files locally | documentation |
This policy is based on information in the following files:
- windows/device/Group Policy/Any Removable Storage and CD-DVD and WPD Group.xml
- windows/device/Group Policy/Audit File Information.xml
Device control policy rules and groups can be deployed through the following management tools:
Create a reusable setting for Any Removable Storage and CD-DVD and WPD Group_1
-
Navigate to Home > Endpoint Security > Attack Surface Reduction
-
Click on Reusable Settings
-
Click (+) Add
-
Enter the Any Removable Storage and CD-DVD and WPD Group_1 for the name.
-
Optionally, enter a description
-
Click on "Next"
-
Set the match type toggle to MatchAny
-
Click "Next"
-
Click "Add"
Create a Device Control Rules configuration profile
- Navigate to Home > Endpoint Security > Attack Surface Reduction
- Click on "Create Policy"
- Under Platform, select "Windows 10 and later"
- Under Profile, select "Device Control Rules"
- Click "Create"
- Under Name, enter **
- Optionally, enter a description
- Click "Next"
Add a rule for Audit File Information to the policy
-
Click on "+ Set reusable settings" under Included Id
-
Click on Any Removable Storage and CD-DVD and WPD Group_1
-
Click on "Select"
-
Click on "+ Edit Entry"
-
Enter Audit File Information for the name
-
Select Allow from "Type"
-
Select Create file evidence without file from "Options"
-
Select ** from "Access mask"
-
Click "OK"
Define device control policy groups
- Go to Computer Configuration > Administrative Templates > Windows Components > Microsoft Defender Antivirus > Device Control > Define device control policy groups.
- Save the XML below to a network share.
<Groups>
<Group Id="{9b28fae8-72f7-4267-a1a5-685f747a7146}" Type="Device">
<!-- ./Vendor/MSFT/Defender/Configuration/DeviceControl/PolicyGroups/%7B9b28fae8-72f7-4267-a1a5-685f747a7146%7D/GroupData -->
<Name>Any Removable Storage and CD-DVD and WPD Group_1</Name>
<MatchType>MatchAny</MatchType>
<DescriptorIdList>
<PrimaryId>RemovableMediaDevices</PrimaryId>
<PrimaryId>CdRomDevices</PrimaryId>
<PrimaryId>WpdDevices</PrimaryId>
</DescriptorIdList>
</Group>
</Groups>
- In the Define device control policy groups window, select Enabled and specify the network share file path containing the XML groups data.
Define device control policy rules
- Go to Computer Configuration > Administrative Templates > Windows Components > Microsoft Defender Antivirus > Device Control > Define device control policy rules.
- Save the XML below to a network share.
<PolicyRules>
<PolicyRule Id="{b8615f3d-a41e-4c70-a70a-88e7b7aa7768}" >
<!-- ./Vendor/MSFT/Defender/Configuration/DeviceControl/PolicyRules/%7Bb8615f3d-a41e-4c70-a70a-88e7b7aa7768%7D/RuleData -->
<Name>Audit File Information</Name>
<IncludedIdList>
<GroupId>{9b28fae8-72f7-4267-a1a5-685f747a7146}</GroupId>
</IncludedIdList>
<ExcludedIdList>
</ExcludedIdList>
<Entry Id="{ae40741a-cc96-42b7-9dab-f5ba59adef8a}">
<Type>Allow</Type>
<AccessMask>16</AccessMask>
<Options>16</Options>
</Entry>
</PolicyRule>
</PolicyRules>
- In the Define device control policy rules window, select Enabled, and enter the network share file path containing the XML rules data.
Create custom intune configuration
- Navigate to Devices > Configuration profiles
- Click Create (New Policy)
- Select Platform "Windows 10 and Later"
- Select Profile "Templates"
- Select Template Name "Custom"
- Click "Create"
- Under Name, enter **
- Optionally, enter a description
- Click "Next"
Add a row for Audit File Information
-
Click "Add"
-
For Name, enter Audit File Information
-
For Description, enter **
-
For OMA-URI, enter ./Vendor/MSFT/Defender/Configuration/DeviceControl/PolicyRules/%7Bb8615f3d-a41e-4c70-a70a-88e7b7aa7768%7D/RuleData
-
For Data type, select String (XML File)
-
For Custom XML, select windows\device\Intune OMA-URI\audit_file_information{b8615f3d-a41e-4c70-a70a-88e7b7aa7768}.xml
-
Click "Save"
Add a row for Any Removable Storage and CD-DVD and WPD Group_0
-
Click "Add"
-
For Name, enter Any Removable Storage and CD-DVD and WPD Group_0
-
For Description, enter **
-
For OMA-URI, enter ./Vendor/MSFT/Defender/Configuration/DeviceControl/PolicyGroups/%7B9b28fae8-72f7-4267-a1a5-685f747a7146%7D/GroupData
-
For Data type, select String (XML File)
-
For Custom XML, select windows\device\Intune OMA-URI\Any Removable Storage and CD-DVD and WPD Group.xml
-
Click "Save"
Add a row for DeviceControlEnabled
-
Click "Add"
-
For Name, enter DeviceControlEnabled
-
For Description, enter **
-
For OMA-URI, enter ./Vendor/MSFT/Defender/Configuration/DeviceControlEnabled
-
For Data type, select Integer
-
For Value, enter 1
-
Click "Save"
Add a row for DefaultEnforcement
-
Click "Add"
-
For Name, enter DefaultEnforcement
-
For Description, enter **
-
For OMA-URI, enter ./Vendor/MSFT/Defender/Configuration/DefaultEnforcement
-
For Data type, select Integer
-
For Value, enter 1
-
Click "Save"
Add a row for DataDuplicationDirectory
-
Click "Add"
-
For Name, enter DataDuplicationDirectory
-
For Description, enter **
-
For OMA-URI, enter ./Device/Vendor/MSFT/Defender/Configuration/DataDuplicationDirectory
-
For Data type, select String
-
For Value, enter Enter the directory to store files locally
-
Click "Save"