Skip to content

Commit 3e2bcba

Browse files
committed
Check-PurviewConfig
1 parent cb762b1 commit 3e2bcba

File tree

3 files changed

+366
-0
lines changed

3 files changed

+366
-0
lines changed
Lines changed: 363 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,363 @@
1+
---
2+
external help file: Microsoft.Exchange.TransportMailflow-Help.xml
3+
online version: https://learn.microsoft.com/powershell/module/exchange/check-purviewconfig
4+
applicable: Security & Compliance
5+
title: Check-PurviewConfig
6+
schema: 2.0.0
7+
author: chrisda
8+
ms.author: chrisda
9+
ms.reviewer:
10+
---
11+
12+
# Check-PurviewConfig
13+
14+
## SYNOPSIS
15+
This cmdlet is available only in Security & Compliance PowerShell. For more information, see [Security & Compliance PowerShell](https://learn.microsoft.com/powershell/exchange/scc-powershell).
16+
17+
Use the Check-PurviewConfig cmdlet to validate and review your organization's configuration settings in Microsoft Purview.
18+
19+
For information about the parameter sets in the Syntax section below, see [Exchange cmdlet syntax](https://learn.microsoft.com/powershell/exchange/exchange-cmdlet-syntax).
20+
21+
## SYNTAX
22+
23+
```
24+
Check-PurviewConfig
25+
[[-Component] <PurviewConfigComponent>]
26+
[[-DateTimeUTC] <String>]
27+
[[-File] <String>]
28+
[[-IncidentId] <String>]
29+
[[-ItemId] <String>]
30+
[[-MessageId] <String>]
31+
[[-RecordId] <String>]
32+
[[-RuleName] <String>]
33+
[[-TestCases] <String[]>]
34+
[[-Theme] <PurviewConfigTheme>]
35+
[[-UserPrincipalName] <Object>]
36+
[[-Workload] <String>]
37+
[-Confirm]
38+
[-WhatIf]
39+
[<CommonParameters>]
40+
```
41+
42+
## DESCRIPTION
43+
Use the Check-PurviewConfig cmdlet to run Microsoft Information Protection diagnostic test cases for your organization and check the results.
44+
45+
To use this cmdlet in Security & Compliance PowerShell, you need to be assigned permissions. For more information, see [Permissions in the Microsoft Purview compliance portal](https://learn.microsoft.com/purview/microsoft-365-compliance-center-permissions).
46+
47+
## EXAMPLES
48+
49+
### Example 1
50+
```powershell
51+
Check-PurviewConfig
52+
```
53+
54+
This example runs all Microsoft Information Protection test cases that don't require additional parameters.
55+
56+
### Example 2
57+
```powershell
58+
Check-PurviewConfig -Component Encryption
59+
```
60+
61+
This example runs all test cases for the Encryption component.
62+
63+
### Example 3
64+
```powershell
65+
Check-PurviewConfig -Component Encryption -Theme LicenseAvailability
66+
```
67+
68+
This example runs all cases for the LicenseAvailability theme in the Encryption component.
69+
70+
### Example 4
71+
```powershell
72+
Check-PurviewConfig -TestCases "MipLabels_EnabledEntities_ScopedLabels" -UserPrincipalName [email protected]
73+
```
74+
75+
This example runs the test case named MipLabels_EnabledEntities_ScopedLabels, which requires a UserPrincipalName value.
76+
77+
### Example 5
78+
```powershell
79+
Check-PurviewConfig -TestCases "MipLabels_EnabledEntities_ScopedLabels","MipLabels_EnabledEntities_CompareSyncStatus" -UserPrincipalName [email protected]
80+
```
81+
82+
This example runs the specified test cases. A UserPrincipalName value is required for the MipLabels_EnabledEntities_ScopedLabels test case.
83+
84+
## PARAMETERS
85+
86+
### -Component
87+
The Component parameter specifies the component to analyze in the test case. Valid values are:
88+
89+
- DLP
90+
- DLPAlerts
91+
- Encryption
92+
- MIPLabels
93+
94+
```yaml
95+
Type: PurviewConfigComponent
96+
Parameter Sets: (All)
97+
Aliases:
98+
Applicable: Security & Compliance
99+
100+
Required: False
101+
Position: 0
102+
Default value: None
103+
Accept pipeline input: False
104+
Accept wildcard characters: False
105+
```
106+
107+
### -Confirm
108+
The Confirm switch specifies whether to show or hide the confirmation prompt. How this switch affects the cmdlet depends on if the cmdlet requires confirmation before proceeding.
109+
110+
- Destructive cmdlets (for example, Remove-\* cmdlets) have a built-in pause that forces you to acknowledge the command before proceeding. For these cmdlets, you can skip the confirmation prompt by using this exact syntax: `-Confirm:$false`.
111+
- Most other cmdlets (for example, New-\* and Set-\* cmdlets) don't have a built-in pause. For these cmdlets, specifying the Confirm switch without a value introduces a pause that forces you acknowledge the command before proceeding.
112+
113+
```yaml
114+
Type: SwitchParameter
115+
Parameter Sets: (All)
116+
Aliases: cf
117+
Applicable: Security & Compliance
118+
119+
Required: False
120+
Position: Named
121+
Default value: None
122+
Accept pipeline input: False
123+
Accept wildcard characters: False
124+
```
125+
126+
### -DateTimeUTC
127+
The DateTimeUTC specifies the date-time of the test case in Coordinated Universal Time (UTC). For example, "2025-06-05 14:30:00".
128+
129+
This parameter is required for the following TestCases values:
130+
131+
- DlpAlerts_CheckAlertsCreated
132+
- DlpAlerts_FindAlertForActivity
133+
134+
```yaml
135+
Type: String
136+
Parameter Sets: (All)
137+
Aliases:
138+
Applicable: Security & Compliance
139+
140+
Required: False
141+
Position: 1
142+
Default value: None
143+
Accept pipeline input: False
144+
Accept wildcard characters: False
145+
```
146+
147+
### -File
148+
{{ Fill File Description }}
149+
150+
```yaml
151+
Type: String
152+
Parameter Sets: (All)
153+
Aliases:
154+
Applicable: Security & Compliance
155+
156+
Required: False
157+
Position: 2
158+
Default value: None
159+
Accept pipeline input: False
160+
Accept wildcard characters: False
161+
```
162+
163+
### -IncidentId
164+
The IncidentId parameter specifies the incident to analyze in the test case.
165+
166+
This parameter is required for the TestCases value **DlpAlerts_FindAlertForActivity**.
167+
168+
```yaml
169+
Type: String
170+
Parameter Sets: (All)
171+
Aliases:
172+
Applicable: Security & Compliance
173+
174+
Required: False
175+
Position: 3
176+
Default value: None
177+
Accept pipeline input: False
178+
Accept wildcard characters: False
179+
```
180+
181+
### -ItemId
182+
{{ Fill ItemId Description }}
183+
184+
```yaml
185+
Type: String
186+
Parameter Sets: (All)
187+
Aliases:
188+
Applicable: Security & Compliance
189+
190+
Required: False
191+
Position: 4
192+
Default value: None
193+
Accept pipeline input: False
194+
Accept wildcard characters: False
195+
```
196+
197+
### -MessageId
198+
{{ Fill MessageId Description }}
199+
200+
```yaml
201+
Type: String
202+
Parameter Sets: (All)
203+
Aliases:
204+
Applicable: Security & Compliance
205+
206+
Required: False
207+
Position: 5
208+
Default value: None
209+
Accept pipeline input: False
210+
Accept wildcard characters: False
211+
```
212+
213+
### -RecordId
214+
The RuleName parameter specifies the record to analyze in the test case.
215+
216+
This parameter is optional with the TestCases value DlpAlerts_FindAlertForActivity.
217+
218+
```yaml
219+
Type: String
220+
Parameter Sets: (All)
221+
Aliases:
222+
Applicable: Security & Compliance
223+
224+
Required: False
225+
Position: 6
226+
Default value: None
227+
Accept pipeline input: False
228+
Accept wildcard characters: False
229+
```
230+
231+
### -RuleName
232+
The RuleName parameter specifies the rule to analyze in the test case.
233+
234+
This parameter is optional with the TestCases value DlpAlerts_CheckAlertsCreated.
235+
236+
```yaml
237+
Type: String
238+
Parameter Sets: (All)
239+
Aliases:
240+
Applicable: Security & Compliance
241+
242+
Required: False
243+
Position: 7
244+
Default value: None
245+
Accept pipeline input: False
246+
Accept wildcard characters: False
247+
```
248+
249+
### -TestCases
250+
The TestCases parameter specifies the name of the test case to analyze. The available test cases and their required parameters are described in the following list:
251+
252+
- **Encryption_EvaluationDetails**: Validates email encryption evaluation details. No other parameters are required.
253+
- **Encryption_LicenseAvailability**: Checks email encryption configurations. No other parameters are required.
254+
- **MipLabels_EnabledEntities_ScopedLabels**: Shows the labels and label settings that apply to a user. Requires the UserPrincipalName parameter.
255+
- **MipLabels_LicenseAvailability**: Verifies whether the MIP Label feature is enabled. No other parameters required.
256+
- **DlpAlerts_CheckAlertsCreated**: Validates the DLP rule configuration for alerts created in last 5 days. Requires the DateTimeUTC parameter. The RuleName parameter is optional.
257+
- **DlpAlerts_FindAlertForActivity**: Identifies missing alerts for an activity. Requires the DateTimeUTC parameter. The IncidentId and RecordId parameters are optional.
258+
- **DLP_ScopedEntities**: Returns all DLP policies and rules that apply to a user or a site. Requires the Workload parameter. The SiteUrl and UserPrincipalName parameters are optional.
259+
260+
You can specify multiple values separated by commas.
261+
262+
```yaml
263+
Type: String[]
264+
Parameter Sets: (All)
265+
Aliases:
266+
Applicable: Security & Compliance
267+
268+
Required: False
269+
Position: 8
270+
Default value: None
271+
Accept pipeline input: False
272+
Accept wildcard characters: False
273+
```
274+
275+
### -Theme
276+
The Theme parameter filters specifies the them to analyze in the test case. Valid values are:
277+
278+
- EnabledEntities
279+
- EvaluationDetails
280+
- LicenseAvailability
281+
282+
```yaml
283+
Type: PurviewConfigTheme
284+
Parameter Sets: (All)
285+
Aliases:
286+
Applicable: Security & Compliance
287+
288+
Required: False
289+
Position: 9
290+
Default value: None
291+
Accept pipeline input: False
292+
Accept wildcard characters: False
293+
```
294+
295+
### -UserPrincipalName
296+
The UserPrincipalName parameter specifies the user account to analyze in the test case (for example, `[email protected]`).
297+
298+
- Required for the TestCases value MipLabels_EnabledEntities_ScopedLabels.
299+
- Optional for the TestCases value DLP_ScopedEntities.
300+
301+
```yaml
302+
Type: Object
303+
Parameter Sets: (All)
304+
Aliases:
305+
Applicable: Security & Compliance
306+
307+
Required: False
308+
Position: 10
309+
Default value: None
310+
Accept pipeline input: False
311+
Accept wildcard characters: False
312+
```
313+
314+
### -WhatIf
315+
The WhatIf switch doesn't work in Security & Compliance PowerShell.
316+
317+
```yaml
318+
Type: SwitchParameter
319+
Parameter Sets: (All)
320+
Aliases: wi
321+
Applicable: Security & Compliance
322+
323+
Required: False
324+
Position: Named
325+
Default value: None
326+
Accept pipeline input: False
327+
Accept wildcard characters: False
328+
```
329+
330+
### -Workload
331+
The Workload parameter specifies the service workload. Value values are:
332+
333+
- EndpointDevices
334+
- Exchange
335+
- OneDriveForBusiness
336+
- SharePoint
337+
- Teams
338+
339+
This parameter is required for the TestCases value DLP_ScopedEntities.
340+
341+
```yaml
342+
Type: String
343+
Parameter Sets: (All)
344+
Aliases:
345+
Applicable: Security & Compliance
346+
347+
Required: False
348+
Position: 11
349+
Default value: None
350+
Accept pipeline input: False
351+
Accept wildcard characters: False
352+
```
353+
354+
### CommonParameters
355+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/p/?LinkID=113216).
356+
357+
## INPUTS
358+
359+
## OUTPUTS
360+
361+
## NOTES
362+
363+
## RELATED LINKS

exchange/exchange-ps/exchange/exchange.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1729,6 +1729,8 @@ Exchange PowerShell is built on Windows PowerShell technology and provides a pow
17291729
### [Update-ExchangeHelp](Update-ExchangeHelp.md)
17301730

17311731
## policy-and-compliance Cmdlets
1732+
### [Check-PurviewConfig](Check-PurviewConfig.md)
1733+
17321734
### [Disable-JournalArchiving](Disable-JournalArchiving.md)
17331735

17341736
### [Disable-JournalRule](Disable-JournalRule.md)

exchange/mapping/serviceMapping.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -847,6 +847,7 @@
847847
"Test-ServicePrincipalAuthorization": "organization",
848848
"Test-SystemHealth": "organization",
849849
"Update-ExchangeHelp": "organization",
850+
"Check-PurviewConfig": "policy-and-compliance",
850851
"Disable-JournalArchiving": "policy-and-compliance",
851852
"Disable-JournalRule": "policy-and-compliance",
852853
"Disable-OutlookProtectionRule": "policy-and-compliance",

0 commit comments

Comments
 (0)