Skip to content

Commit a853f48

Browse files
Learn Editor: Update device-control-deploy-manage-gpo.md
1 parent 495868b commit a853f48

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

defender-endpoint/device-control-deploy-manage-gpo.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,41 @@ You can create different group types. Here's one group example XML file for any
121121

122122
2. In the **Define device control policy rules** window, select **Enabled**, and then specify the network share file path containing the XML rules data.
123123

124+
## Validating XML files
125+
126+
Mpcmdrun has built in functionality to validate XML files that are utilized for GPO deployments. This allows customers to detect any syntax errors the DC engine may encounter when parsing through the settings. In order to perform this validation, administrators need to copy the following Powershell script and provide the appropriate file path for their XML files containing the Device Control rules and groups.
127+
128+
```
129+
#Path to PolicyRules xml. Provide the filepath of the device control rules XML file
130+
$RulesXML="C:\Policies\PolicyRules.xml"
131+
132+
#Path to Groups XML. Provide the filepath of the device control groups XML file
133+
$GroupsXML="C:\Policies\Groups.xml"
134+
135+
#Retrieve the install path from Defender
136+
$DefenderPath=(Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows Defender" -Name "InstallLocation").InstallLocation
137+
138+
#Test PolicyRules
139+
& $DefenderPath\mpcmdrun.exe -devicecontrol -testpolicyxml $RulesXML -rules
140+
141+
#Test Groups
142+
& $DefenderPath\mpcmdrun.exe -devicecontrol -testpolicyxml $GroupsXML -groups
143+
```
144+
145+
146+
If there are no errors the following output will be printed in the PowerShell console:
147+
148+
149+
```
150+
DC policy rules parsing succeeded
151+
Verifying absolute rules data against the original data
152+
Rules verified with success
153+
DC policy groups parsing succeeded
154+
Verifying absolute groups data against the original data
155+
Groups verified with success
156+
Has Group Dependency Loop: no
157+
```
158+
124159
> [!NOTE]
125160
> To capture evidence of files being copied or printed, use [Endpoint DLP.](/purview/dlp-copy-matched-items-get-started?tabs=purview-portal%2Cpurview)
126161
>

0 commit comments

Comments
 (0)