You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: exchange/exchange-ps/exchange/policy-and-compliance-audit/Get-UnifiedAuditLogRetentionPolicy.md
+15-7Lines changed: 15 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ monikerRange: "o365scc-ps"
15
15
## SYNOPSIS
16
16
This cmdlet is available only in Office 365 Security & Compliance Center PowerShell. For more information, see [Office 365 Security & Compliance Center PowerShell](https://docs.microsoft.com/powershell/exchange/office-365-scc/office-365-scc-powershell).
17
17
18
-
Use the Get-UnifiedAuditLogRetentionPolicy cmdlet to
18
+
Use the Get-UnifiedAuditLogRetentionPolicy cmdlet to view the properties of the audit log retention policies in your organization.
19
19
20
20
For information about the parameter sets in the Syntax section below, see [Exchange cmdlet syntax](https://docs.microsoft.com/powershell/exchange/exchange-server/exchange-cmdlet-syntax).
Audit log retention policies are used to specify a retention duration for audit logs for that are generated by admin and user activity. An audit log retention policy can specify the retention duration based on the type of audited activities, the Office 365 service that activities are performed in, or the users who performed the activities. For more information, see [Manage audit log retention policies](https://docs.microsoft.com/microsoft-365/compliance/audit-log-retention-policies).
35
+
34
36
You need to be assigned permissions in the Office 365 Security & Compliance Center before you can use this cmdlet. For more information, see [Permissions in Office 365 Security & Compliance Center](https://go.microsoft.com/fwlink/p/?LinkId=511920).
This example lists the configurable properties for all audit log retention policies in your organization. The command also lists the policies in order of highest to lowest priority.
This example lists the configurable properties for all audit log retention policies that apply to audit records the record type of ExchangeItem.
53
+
44
54
45
55
## PARAMETERS
46
56
47
57
### -Operation
48
-
The Operations parameter filters the policy results by the operations that are specified in the policy. The available values for this parameter depend on the RecordType value. For a list of the available values for this parameter, see [Audited activities](https://go.microsoft.com/fwlink/p/?LinkId=708432).
58
+
The Operations parameter filters the results by the operations that are specified in the policy. For a list of the available values for this parameter, see [Audited activities](https://go.microsoft.com/fwlink/p/?LinkId=708432).
49
59
50
60
To enter multiple values, use the following syntax: \<value1\>,\<value2\>,...\<valueX\>. If the values contain spaces or otherwise require quotation marks, use the following syntax: "\<value1\>","\<value2\>",..."\<valueX\>".
Copy file name to clipboardExpand all lines: exchange/exchange-ps/exchange/policy-and-compliance-audit/New-UnifiedAuditLogRetentionPolicy.md
+24-18Lines changed: 24 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ monikerRange: "o365scc-ps"
15
15
## SYNOPSIS
16
16
This cmdlet is available only in Office 365 Security & Compliance Center PowerShell. For more information, see [Office 365 Security & Compliance Center PowerShell](https://docs.microsoft.com/powershell/exchange/office-365-scc/office-365-scc-powershell).
17
17
18
-
Use the New-UnifiedAuditLogRetentionPolicy cmdlet to
18
+
Use the New-UnifiedAuditLogRetentionPolicy cmdlet to create audit log retention policies in the Office 365 Security & Compliance Center.
19
19
20
20
For information about the parameter sets in the Syntax section below, see [Exchange cmdlet syntax](https://docs.microsoft.com/powershell/exchange/exchange-server/exchange-cmdlet-syntax).
Audit log retention policies are used to specify a retention duration for audit logs for that are generated by admin and user activity. An audit log retention policy can specify the retention duration based on the type of audited activities, the Office 365 service that activities are performed in, or the users who performed the activities. For more information, see [Manage audit log retention policies](https://docs.microsoft.com/microsoft-365/compliance/audit-log-retention-policies).
36
+
35
37
You need to be assigned permissions in the Office 365 Security & Compliance Center before you can use this cmdlet. For more information, see [Permissions in Office 365 Security & Compliance Center](https://go.microsoft.com/fwlink/p/?LinkId=511920).
36
38
37
39
## EXAMPLES
38
40
39
41
### Example 1
40
42
```powershell
41
-
{{ Add example code here }}
43
+
New-UnifiedAuditLogRetentionPolicy -Name "Microsoft Teams Audit Policy" -Description "One year retention policy for all Microsoft Teams activities" -RecordTypes MicrosoftTeams -RetentionDuration TwelveMonths -Priority 100
44
+
```
45
+
46
+
This example creates an audit log retention policy that retains all audit logs related to Microsoft Teams events for one year.
47
+
48
+
### Example 2
49
+
```powershell
50
+
New-UnifiedAuditLogRetentionPolicy -Name "SearchQueryPerformed by app@sharepoint" -Description "90 day retention policy for noisy SharePoint events" -RecordTypes SharePoint -Operations SearchQueryPerformed -UserIds "app@sharepoint" -RetentionDuration ThreeMonths -Priority 10000
42
51
```
43
52
44
-
{{ Add example description here }}
53
+
This example creates an audit log retention policy that retains all audit logs for the SearchQueryPerformed activity performed by the app@sharepoint service account for 90 days.
45
54
46
55
## PARAMETERS
47
56
48
57
### -Name
49
-
The Name parameter specifies a unique name for the unified audit log retention policy. The maximum length is 64 characters. If the value contains spaces, enclose the value in quotation marks (").
58
+
The Name parameter specifies a unique name for the audit log retention policy. The maximum length is 64 characters. If the value contains spaces, enclose the value in quotation marks (").
The Priority parameter specifies a priority value for the policy that determines the order of policy processing. A lower integer value indicates a higher priority, the value 0 is the highest priority, and policies can't have the same priority value.
74
+
The Priority parameter specifies a priority value for the policy that determines the order of policy processing. A higher integer value indicates a higher priority, the value 10000 is the highest priority, and policies can't have the same priority value.
66
75
67
76
Valid values and the default value for this parameter depend on the number of existing policies. For example, if there are 8 existing policies:
68
77
69
-
- Valid priority values for the existing 8 policies are from 0 through 7.
70
-
71
-
- Valid priority values for a new policy (the 9th policy) are from 0 through 8.
78
+
- Valid priority values for the existing 8 policies are from 7 through 0.
72
79
73
-
- The default value for a new policy (the 9th policy) is 8.
80
+
- Valid priority values for a new policy (the 9th policy) are from 8 through 0.
74
81
75
-
If you modify the priority value of a policy, the position of the policy in the list changes to match the priority value you specify. In other words, if you set the priority value of a policy to the same value as an existing policy, the priority value of the existing policy and all other lower priority policies after it is increased by 1.
82
+
You must use a unique priority value when creating new audit log retention policies. Any custom audit log retention policy that you create will take precedence over the default audit log retention policy. For more information, see [Advanced audit in Microsoft 365](https://docs.microsoft.com/microsoft-365/compliance/advanced-audit).
The Description parameter specifies a description for the unified audit log retention policy. The maximum length is 256 characters. If the value contains spaces, enclose the value in quotation marks (").
143
+
The Description parameter specifies a description for the audit log retention policy. The maximum length is 256 characters. If the value contains spaces, enclose the value in quotation marks (").
The Operations parameter specifies the unified audit log operations that are preserved by the policy. The available values for this parameter depend on the RecordType value. For a list of the available values for this parameter, see [Audited activities](https://go.microsoft.com/fwlink/p/?LinkId=708432).
159
+
The Operations parameter specifies the audit log operations that are retained by the policy. For a list of the available values for this parameter, see [Audited activities](https://go.microsoft.com/fwlink/p/?LinkId=708432).
153
160
154
161
To enter multiple values, use the following syntax: \<value1\>,\<value2\>,...\<valueX\>. If the values contain spaces or otherwise require quotation marks, use the following syntax: "\<value1\>","\<value2\>",..."\<valueX\>".
155
162
163
+
If you use this parameter, you must also use the RecordTypes parameter to specify the record type. You can't use this parameter if you've specified more than one value for the RecordTypes parameter.
The RecordTypes parameter specifies the record type labels that are preserved by the policy. Valid values are:
179
+
The RecordTypes parameter specifies the audit logs of a specific record type that are retained by the policy. You can specify multiple values separated by commas. If you specify more than one value, you can't use the Operations parameter. Valid values are:
171
180
172
181
- AeD
173
182
@@ -313,13 +322,10 @@ The RecordTypes parameter specifies the record type labels that are preserved by
313
322
314
323
- Yammer
315
324
316
-
You can specify multiple values separated by commas.
The UserIds parameter specifies the log entries that are retained by the policy based on the ID of the user who performed the action.
339
+
The UserIds parameter specifies the audit logs that are retained by the policy based on the ID of the user who performed the action.
334
340
335
341
To enter multiple values, use the following syntax: \<value1\>,\<value2\>,...\<valueX\>. If the values contain spaces or otherwise require quotation marks, use the following syntax: "\<value1\>","\<value2\>",..."\<valueX\>".
Copy file name to clipboardExpand all lines: exchange/exchange-ps/exchange/policy-and-compliance-audit/Remove-UnifiedAuditLogRetentionPolicy.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ monikerRange: "o365scc-ps"
15
15
## SYNOPSIS
16
16
This cmdlet is available only in Office 365 Security & Compliance Center PowerShell. For more information, see [Office 365 Security & Compliance Center PowerShell](https://docs.microsoft.com/powershell/exchange/office-365-scc/office-365-scc-powershell).
17
17
18
-
Use the Set-UnifiedAuditLogRetentionPolicy cmdlet to
18
+
Use the Remove-UnifiedAuditLogRetentionPolicy cmdlet to delete audit log retention policies. It might take up to 30 minutes for the policy to be completely removed. For more information, see [Manage audit log retention policies](https://docs.microsoft.com/microsoft-365/compliance/audit-log-retention-policies).
19
19
20
20
For information about the parameter sets in the Syntax section below, see [Exchange cmdlet syntax](https://docs.microsoft.com/powershell/exchange/exchange-server/exchange-cmdlet-syntax).
21
21
@@ -36,15 +36,15 @@ You need to be assigned permissions in the Office 365 Security & Compliance Cent
36
36
37
37
### Example 1
38
38
```powershell
39
-
{{ Add example code here }}
39
+
Remove-UnifiedAuditLogRetentionPolicy -Identity "SearchQueryPerformed by app@sharepoint"
40
40
```
41
41
42
-
{{ Add example description here }}
42
+
This example deletes the audit log retention policy named "SearchQueryPerformed by app@sharepoint".
43
43
44
44
## PARAMETERS
45
45
46
46
### -Identity
47
-
The Identity parameter specifies the unified audit log retention policy that you want to modify. You can use any value that uniquely identifies the policy. For example:
47
+
The Identity parameter specifies the audit log retention policy that you want to delete. You can use any value that uniquely identifies the policy. For example:
0 commit comments