Skip to content

Commit 261b852

Browse files
authored
Merge branch 'main' into jinglu/defaultValue
2 parents 27259a6 + c3ab548 commit 261b852

15 files changed

+731
-201
lines changed
Lines changed: 372 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,372 @@
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] <SmtpAddress>]
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+
You need to be a member of the Global Administrators role to run this cmdlet.
46+
47+
To learn more about administrator role permissions in Microsoft Entra ID, see [Role template IDs](https://learn.microsoft.com/entra/identity/role-based-access-control/permissions-reference#role-template-ids).
48+
49+
> [!IMPORTANT]
50+
> Microsoft recommends that you use roles with the fewest permissions. Using lower permissioned accounts helps improve security for your organization. Global Administrator is a highly privileged role that should be limited to emergency scenarios when you can't use an existing role.
51+
52+
## EXAMPLES
53+
54+
### Example 1
55+
```powershell
56+
Check-PurviewConfig
57+
```
58+
59+
This example runs all Microsoft Information Protection test cases that don't require additional parameters.
60+
61+
### Example 2
62+
```powershell
63+
Check-PurviewConfig -Component Encryption
64+
```
65+
66+
This example runs all test cases for the Encryption component.
67+
68+
### Example 3
69+
```powershell
70+
Check-PurviewConfig -Component Encryption -Theme LicenseAvailability
71+
```
72+
73+
This example runs all cases for the LicenseAvailability theme in the Encryption component.
74+
75+
### Example 4
76+
```powershell
77+
Check-PurviewConfig -TestCases "MipLabels_EnabledEntities_ScopedLabels" -UserPrincipalName [email protected]
78+
```
79+
80+
This example runs the test case named MipLabels_EnabledEntities_ScopedLabels, which requires a UserPrincipalName value.
81+
82+
### Example 5
83+
```powershell
84+
Check-PurviewConfig -TestCases "MipLabels_EnabledEntities_ScopedLabels","MipLabels_EnabledEntities_CompareSyncStatus" -UserPrincipalName [email protected]
85+
```
86+
87+
This example runs the specified test cases. A UserPrincipalName value is required for the MipLabels_EnabledEntities_ScopedLabels test case.
88+
89+
## PARAMETERS
90+
91+
### -Component
92+
The Component parameter specifies the component to analyze in the test case. Valid values are:
93+
94+
- DLP
95+
- DLPAlerts
96+
- Encryption
97+
- MIPLabels
98+
99+
```yaml
100+
Type: PurviewConfigComponent
101+
Parameter Sets: (All)
102+
Aliases:
103+
Applicable: Security & Compliance
104+
105+
Required: False
106+
Position: 0
107+
Default value: None
108+
Accept pipeline input: False
109+
Accept wildcard characters: False
110+
```
111+
112+
### -Confirm
113+
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.
114+
115+
- 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`.
116+
- 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.
117+
118+
```yaml
119+
Type: SwitchParameter
120+
Parameter Sets: (All)
121+
Aliases: cf
122+
Applicable: Security & Compliance
123+
124+
Required: False
125+
Position: Named
126+
Default value: None
127+
Accept pipeline input: False
128+
Accept wildcard characters: False
129+
```
130+
131+
### -DateTimeUTC
132+
The DateTimeUTC specifies the date-time of the test case in Coordinated Universal Time (UTC). For example, "2025-06-05 14:30:00".
133+
134+
This parameter is required for the following TestCases values:
135+
136+
- DlpAlerts_CheckAlertsCreated
137+
- DlpAlerts_FindAlertForActivity
138+
139+
```yaml
140+
Type: String
141+
Parameter Sets: (All)
142+
Aliases:
143+
Applicable: Security & Compliance
144+
145+
Required: False
146+
Position: 1
147+
Default value: None
148+
Accept pipeline input: False
149+
Accept wildcard characters: False
150+
```
151+
152+
### -File
153+
This parameter is reserved for internal Microsoft use.
154+
155+
```yaml
156+
Type: String
157+
Parameter Sets: (All)
158+
Aliases:
159+
Applicable: Security & Compliance
160+
161+
Required: False
162+
Position: 2
163+
Default value: None
164+
Accept pipeline input: False
165+
Accept wildcard characters: False
166+
```
167+
168+
### -IncidentId
169+
The IncidentId parameter specifies the incident to analyze in the test case.
170+
171+
You can find a value for this parameter in audit log searches filtered by the operation DLPRuleMatch in the IncidentId property.
172+
173+
This parameter is required for the TestCases value DlpAlerts_FindAlertForActivity.
174+
175+
```yaml
176+
Type: String
177+
Parameter Sets: (All)
178+
Aliases:
179+
Applicable: Security & Compliance
180+
181+
Required: False
182+
Position: 3
183+
Default value: None
184+
Accept pipeline input: False
185+
Accept wildcard characters: False
186+
```
187+
188+
### -ItemId
189+
This parameter is reserved for internal Microsoft use.
190+
191+
```yaml
192+
Type: String
193+
Parameter Sets: (All)
194+
Aliases:
195+
Applicable: Security & Compliance
196+
197+
Required: False
198+
Position: 4
199+
Default value: None
200+
Accept pipeline input: False
201+
Accept wildcard characters: False
202+
```
203+
204+
### -MessageId
205+
This parameter is reserved for internal Microsoft use.
206+
207+
```yaml
208+
Type: String
209+
Parameter Sets: (All)
210+
Aliases:
211+
Applicable: Security & Compliance
212+
213+
Required: False
214+
Position: 5
215+
Default value: None
216+
Accept pipeline input: False
217+
Accept wildcard characters: False
218+
```
219+
220+
### -RecordId
221+
The RuleName parameter specifies the record to analyze in the test case.
222+
223+
You can find a value for this parameter in Activity Explorer filtered by the activity type DLPRuleMatch in the RecordId property.
224+
225+
This parameter is optional with the TestCases value DlpAlerts_FindAlertForActivity.
226+
227+
```yaml
228+
Type: String
229+
Parameter Sets: (All)
230+
Aliases:
231+
Applicable: Security & Compliance
232+
233+
Required: False
234+
Position: 6
235+
Default value: None
236+
Accept pipeline input: False
237+
Accept wildcard characters: False
238+
```
239+
240+
### -RuleName
241+
The RuleName parameter specifies the DLP rule to analyze in the test case.
242+
243+
This parameter is optional with the TestCases value DlpAlerts_CheckAlertsCreated.
244+
245+
```yaml
246+
Type: String
247+
Parameter Sets: (All)
248+
Aliases:
249+
Applicable: Security & Compliance
250+
251+
Required: False
252+
Position: 7
253+
Default value: None
254+
Accept pipeline input: False
255+
Accept wildcard characters: False
256+
```
257+
258+
### -TestCases
259+
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:
260+
261+
- **Encryption_EvaluationDetails**: Validates email encryption evaluation details. No other parameters are required.
262+
- **Encryption_LicenseAvailability**: Checks email encryption configurations. No other parameters are required.
263+
- **MipLabels_EnabledEntities_ScopedLabels**: Shows the labels and label settings that apply to a user. Requires the UserPrincipalName parameter.
264+
- **MipLabels_LicenseAvailability**: Verifies whether the MIP Label feature is enabled. No other parameters required.
265+
- **DlpAlerts_CheckAlertsCreated**: Validates the DLP rule configuration for alerts created in last 5 days. Requires the DateTimeUTC parameter. The RuleName parameter is optional.
266+
- **DlpAlerts_FindAlertForActivity**: Identifies missing alerts for an activity. Requires the DateTimeUTC parameter. The IncidentId and RecordId parameters are optional.
267+
- **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.
268+
269+
You can specify multiple values separated by commas.
270+
271+
```yaml
272+
Type: String[]
273+
Parameter Sets: (All)
274+
Aliases:
275+
Applicable: Security & Compliance
276+
277+
Required: False
278+
Position: 8
279+
Default value: None
280+
Accept pipeline input: False
281+
Accept wildcard characters: False
282+
```
283+
284+
### -Theme
285+
The Theme parameter filters specifies the them to analyze in the test case. Valid values are:
286+
287+
- EnabledEntities
288+
- EvaluationDetails
289+
- LicenseAvailability
290+
291+
```yaml
292+
Type: PurviewConfigTheme
293+
Parameter Sets: (All)
294+
Aliases:
295+
Applicable: Security & Compliance
296+
297+
Required: False
298+
Position: 9
299+
Default value: None
300+
Accept pipeline input: False
301+
Accept wildcard characters: False
302+
```
303+
304+
### -UserPrincipalName
305+
The UserPrincipalName parameter specifies the user account to analyze in the test case (for example, `[email protected]`).
306+
307+
- Required for the TestCases value MipLabels_EnabledEntities_ScopedLabels.
308+
- Optional for the TestCases value DLP_ScopedEntities.
309+
310+
```yaml
311+
Type: SmtpAddress
312+
Parameter Sets: (All)
313+
Aliases:
314+
Applicable: Security & Compliance
315+
316+
Required: False
317+
Position: 10
318+
Default value: None
319+
Accept pipeline input: False
320+
Accept wildcard characters: False
321+
```
322+
323+
### -WhatIf
324+
The WhatIf switch doesn't work in Security & Compliance PowerShell.
325+
326+
```yaml
327+
Type: SwitchParameter
328+
Parameter Sets: (All)
329+
Aliases: wi
330+
Applicable: Security & Compliance
331+
332+
Required: False
333+
Position: Named
334+
Default value: None
335+
Accept pipeline input: False
336+
Accept wildcard characters: False
337+
```
338+
339+
### -Workload
340+
The Workload parameter specifies the service workload. Value values are:
341+
342+
- EndpointDevices
343+
- Exchange
344+
- OneDriveForBusiness
345+
- SharePoint
346+
- Teams
347+
348+
This parameter is required for the TestCases value DLP_ScopedEntities.
349+
350+
```yaml
351+
Type: String
352+
Parameter Sets: (All)
353+
Aliases:
354+
Applicable: Security & Compliance
355+
356+
Required: False
357+
Position: 11
358+
Default value: None
359+
Accept pipeline input: False
360+
Accept wildcard characters: False
361+
```
362+
363+
### CommonParameters
364+
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).
365+
366+
## INPUTS
367+
368+
## OUTPUTS
369+
370+
## NOTES
371+
372+
## RELATED LINKS

0 commit comments

Comments
 (0)