Skip to content

Commit 7bb88f3

Browse files
authored
Merge pull request MicrosoftDocs#4850 from markjjo/markjjo-working
Merge UAL cmdlet topics to UALRetentionPolicy-chrisda
2 parents 4a60a94 + 3de7661 commit 7bb88f3

File tree

4 files changed

+66
-45
lines changed

4 files changed

+66
-45
lines changed

exchange/exchange-ps/exchange/policy-and-compliance-audit/Get-UnifiedAuditLogRetentionPolicy.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ monikerRange: "o365scc-ps"
1515
## SYNOPSIS
1616
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).
1717

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.
1919

2020
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).
2121

@@ -31,21 +31,31 @@ Get-UnifiedAuditLogRetentionPolicy
3131
```
3232

3333
## DESCRIPTION
34+
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+
3436
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).
3537

3638
## EXAMPLES
3739

3840
### Example 1
3941
```powershell
40-
{{ Add example code here }}
42+
Get-UnifiedAuditLogRetentionPolicy | Sort-Object -Property Priority -Descending | Format-List Priority,Name,Description,RecordTypes,Operations,UserIds,RetentionDuration
4143
```
4244

43-
{{ Add example description here }}
45+
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.
46+
47+
### Example 2
48+
```powershell
49+
Get-UnifiedAuditLogRetentionPolicy -RecordType ExchangeItem | Format-List Name,Description,RecordTypes,Operations,UserIds,RetentionDuration,Priority
50+
```
51+
52+
This example lists the configurable properties for all audit log retention policies that apply to audit records the record type of ExchangeItem.
53+
4454

4555
## PARAMETERS
4656

4757
### -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).
4959

5060
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\>".
5161

@@ -63,7 +73,7 @@ Accept wildcard characters: False
6373
```
6474
6575
### -RecordType
66-
The RecordType parameter filters the policy results by the record types that are defined in the policy. Valid values are:
76+
The RecordType parameter filters the results by the record types that are defined in the policy. Valid values are:
6777
6878
- AeD
6979
@@ -213,8 +223,6 @@ The RecordType parameter filters the policy results by the record types that are
213223
Type: AuditRecordType
214224
Parameter Sets: (All)
215225
Aliases:
216-
Accepted values: ExchangeAdmin, ExchangeItem, ExchangeItemGroup, SharePoint, SyntheticProbe, SharePointFileOperation, OneDrive, AzureActiveDirectory, AzureActiveDirectoryAccountLogon, DataCenterSecurityCmdlet, ComplianceDLPSharePoint, Sway, ComplianceDLPExchange, SharePointSharingOperation, AzureActiveDirectoryStsLogon, SkypeForBusinessPSTNUsage, SkypeForBusinessUsersBlocked, SecurityComplianceCenterEOPCmdlet, ExchangeAggregatedOperation, PowerBIAudit, CRM, Yammer, SkypeForBusinessCmdlets, Discovery, MicrosoftTeams, ThreatIntelligence, MailSubmission, MicrosoftFlow, AeD, MicrosoftStream, ComplianceDLPSharePointClassification, ThreatFinder, Project, SharePointListOperation, SharePointCommentOperation, DataGovernance, Kaizala, SecurityComplianceAlerts, ThreatIntelligenceUrl, SecurityComplianceInsights, MIPLabel, WorkplaceAnalytics, PowerAppsApp, PowerAppsPlan, ThreatIntelligenceAtpContent, LabelExplorer, TeamsHealthcare, ExchangeItemAggregated, HygieneEvent, DataInsightsRestApiAudit, InformationBarrierPolicyApplication, SharePointListItemOperation, SharePointContentTypeOperation, SharePointFieldOperation, MicrosoftTeamsAdmin, HRSignal, MicrosoftTeamsDevice, MicrosoftTeamsAnalytics, InformationWorkerProtection, Campaign, DLPEndpoint, AirInvestigation, Quarantine, MicrosoftForms, ApplicationAudit, ComplianceSupervisionExchange, CustomerKeyServiceEncryption, OfficeNative, MipAutoLabelSharePointItem, MipAutoLabelSharePointPolicyLocation, MicrosoftTeamsShifts, MipAutoLabelExchangeItem
217-
Applicable: Office 365 Security & Compliance Center
218226

219227
Required: False
220228
Position: Named

exchange/exchange-ps/exchange/policy-and-compliance-audit/New-UnifiedAuditLogRetentionPolicy.md

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ monikerRange: "o365scc-ps"
1515
## SYNOPSIS
1616
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).
1717

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.
1919

2020
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).
2121

@@ -32,21 +32,30 @@ New-UnifiedAuditLogRetentionPolicy [-Name] <String> -Priority <Int32> -Retention
3232
```
3333

3434
## DESCRIPTION
35+
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+
3537
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).
3638

3739
## EXAMPLES
3840

3941
### Example 1
4042
```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
4251
```
4352

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.
4554

4655
## PARAMETERS
4756

4857
### -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 (").
5059

5160
```yaml
5261
Type: String
@@ -62,17 +71,15 @@ Accept wildcard characters: False
6271
```
6372
6473
### -Priority
65-
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.
6675
6776
Valid values and the default value for this parameter depend on the number of existing policies. For example, if there are 8 existing policies:
6877
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.
7279
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.
7481
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).
7683
7784
```yaml
7885
Type: Int32
@@ -88,7 +95,7 @@ Accept wildcard characters: False
8895
```
8996
9097
### -RetentionDuration
91-
The RetentionDuration parameter specifies how long the unified audit log records are kept. Valid values are:
98+
The RetentionDuration parameter specifies how long audit log records are kept. Valid values are:
9299
93100
- ThreeMonths
94101
@@ -133,7 +140,7 @@ Accept wildcard characters: False
133140
```
134141
135142
### -Description
136-
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 (").
137144
138145
```yaml
139146
Type: String
@@ -149,10 +156,12 @@ Accept wildcard characters: False
149156
```
150157
151158
### -Operations
152-
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).
153160
154161
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\>".
155162
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.
164+
156165
```yaml
157166
Type: MultiValuedProperty
158167
Parameter Sets: (All)
@@ -167,7 +176,7 @@ Accept wildcard characters: False
167176
```
168177
169178
### -RecordTypes
170-
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:
171180
172181
- AeD
173182
@@ -313,13 +322,10 @@ The RecordTypes parameter specifies the record type labels that are preserved by
313322
314323
- Yammer
315324
316-
You can specify multiple values separated by commas.
317-
318325
```yaml
319326
Type: MultiValuedProperty
320327
Parameter Sets: (All)
321328
Aliases:
322-
Accepted values: ExchangeAdmin, ExchangeItem, ExchangeItemGroup, SharePoint, SyntheticProbe, SharePointFileOperation, OneDrive, AzureActiveDirectory, AzureActiveDirectoryAccountLogon, DataCenterSecurityCmdlet, ComplianceDLPSharePoint, Sway, ComplianceDLPExchange, SharePointSharingOperation, AzureActiveDirectoryStsLogon, SkypeForBusinessPSTNUsage, SkypeForBusinessUsersBlocked, SecurityComplianceCenterEOPCmdlet, ExchangeAggregatedOperation, PowerBIAudit, CRM, Yammer, SkypeForBusinessCmdlets, Discovery, MicrosoftTeams, ThreatIntelligence, MailSubmission, MicrosoftFlow, AeD, MicrosoftStream, ComplianceDLPSharePointClassification, ThreatFinder, Project, SharePointListOperation, SharePointCommentOperation, DataGovernance, Kaizala, SecurityComplianceAlerts, ThreatIntelligenceUrl, SecurityComplianceInsights, MIPLabel, WorkplaceAnalytics, PowerAppsApp, PowerAppsPlan, ThreatIntelligenceAtpContent, LabelExplorer, TeamsHealthcare, ExchangeItemAggregated, HygieneEvent, DataInsightsRestApiAudit, InformationBarrierPolicyApplication, SharePointListItemOperation, SharePointContentTypeOperation, SharePointFieldOperation, MicrosoftTeamsAdmin, HRSignal, MicrosoftTeamsDevice, MicrosoftTeamsAnalytics, InformationWorkerProtection, Campaign, DLPEndpoint, AirInvestigation, Quarantine, MicrosoftForms, ApplicationAudit, ComplianceSupervisionExchange, CustomerKeyServiceEncryption, OfficeNative, MipAutoLabelSharePointItem, MipAutoLabelSharePointPolicyLocation, MicrosoftTeamsShifts, MipAutoLabelExchangeItem
323329
Applicable: Office 365 Security & Compliance Center
324330

325331
Required: False
@@ -330,7 +336,7 @@ Accept wildcard characters: False
330336
```
331337
332338
### -UserIds
333-
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.
334340
335341
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\>".
336342

exchange/exchange-ps/exchange/policy-and-compliance-audit/Remove-UnifiedAuditLogRetentionPolicy.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ monikerRange: "o365scc-ps"
1515
## SYNOPSIS
1616
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).
1717

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).
1919

2020
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).
2121

@@ -36,15 +36,15 @@ You need to be assigned permissions in the Office 365 Security & Compliance Cent
3636

3737
### Example 1
3838
```powershell
39-
{{ Add example code here }}
39+
Remove-UnifiedAuditLogRetentionPolicy -Identity "SearchQueryPerformed by app@sharepoint"
4040
```
4141

42-
{{ Add example description here }}
42+
This example deletes the audit log retention policy named "SearchQueryPerformed by app@sharepoint".
4343

4444
## PARAMETERS
4545

4646
### -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:
4848

4949
- Name
5050

0 commit comments

Comments
 (0)