Description: This is a policy.
Device Type: Windows Printer
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 | |||||
Allow PDF and XPS Printing |
|
|
Allow | ✅ | Create file evidence with file (8) | - |
Audit Allowed | 📄 | Send event (2) | - |
This is a group of type Device. The match type for the group is MatchAny.
Property | Value |
---|---|
PrinterConnectionId | File |
View XML
<Group Id="{e5170dfb-19a9-4466-8109-d36c9c912b4e}" Type="Device">
<!-- ./Vendor/MSFT/Defender/Configuration/DeviceControl/PolicyGroups/%7Be5170dfb-19a9-4466-8109-d36c9c912b4e%7D/GroupData -->
<Name>PDF_XPS Printer</Name>
<MatchType>MatchAny</MatchType>
<DescriptorIdList>
<PrinterConnectionId>File</PrinterConnectionId>
</DescriptorIdList>
</Group>
Setting Name | Setting Value | Description | Documentation |
---|---|---|---|
DefaultEnforcement | Deny | Control Device Control default enforcement. This is the enforcement applied if there are no policy rules present or at the end of the policy rules evaluation none were matched. | documentation |
DeviceControlEnabled | True | Enables/disables device control | documentation |
This policy is based on information in the following files:
Device control policy rules and groups can be deployed through the following management tools:
Intune UX is not supported for this policy because:
- Create file evidence with file is an unsupported notification.
Use Intune custom settings to deploy the policy instead.
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="{e5170dfb-19a9-4466-8109-d36c9c912b4e}" Type="Device">
<!-- ./Vendor/MSFT/Defender/Configuration/DeviceControl/PolicyGroups/%7Be5170dfb-19a9-4466-8109-d36c9c912b4e%7D/GroupData -->
<Name>PDF_XPS Printer</Name>
<MatchType>MatchAny</MatchType>
<DescriptorIdList>
<PrinterConnectionId>File</PrinterConnectionId>
</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="{07fb98fd-f25b-4aec-bb99-69d4abd4ec4d}" >
<!-- ./Vendor/MSFT/Defender/Configuration/DeviceControl/PolicyRules/%7B07fb98fd-f25b-4aec-bb99-69d4abd4ec4d%7D/RuleData -->
<Name>Allow PDF and XPS Printing</Name>
<IncludedIdList>
<GroupId>{e5170dfb-19a9-4466-8109-d36c9c912b4e}</GroupId>
</IncludedIdList>
<ExcludedIdList>
</ExcludedIdList>
<Entry Id="{e8cc55ec-17a8-4900-8df5-1af801342e9d}">
<Type>Allow</Type>
<AccessMask>64</AccessMask>
<Options>8</Options>
</Entry>
<Entry Id="{2b410b9c-c940-42ec-be1c-1fcb8cc32bc4}">
<Type>AuditAllowed</Type>
<AccessMask>64</AccessMask>
<Options>2</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 Allow PDF and XPS Printing
-
Click "Add"
-
For Name, enter Allow PDF and XPS Printing
-
For Description, enter **
-
For OMA-URI, enter ./Vendor/MSFT/Defender/Configuration/DeviceControl/PolicyRules/%7B07fb98fd-f25b-4aec-bb99-69d4abd4ec4d%7D/RuleData
-
For Data type, select String (XML File)
-
For Custom XML, select windows/printer/Intune OMA-URI/Allow PDF_XPS Printer - File Evidence.xml
-
Click "Save"
Add a row for PDF_XPS Printer
-
Click "Add"
-
For Name, enter PDF_XPS Printer
-
For Description, enter **
-
For OMA-URI, enter ./Vendor/MSFT/Defender/Configuration/DeviceControl/PolicyGroups/%7Be5170dfb-19a9-4466-8109-d36c9c912b4e%7D/GroupData
-
For Data type, select String (XML File)
-
For Custom XML, select windows/printer/Intune OMA-URI/PDF_XPS Printer.xml
-
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 2
-
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"