Skip to content

Commit b69d39f

Browse files
committed
unified audit log cmdlet topics complete
1 parent 4a60a94 commit b69d39f

File tree

4 files changed

+59
-46
lines changed

4 files changed

+59
-46
lines changed

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

Lines changed: 13 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. 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).
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

@@ -37,15 +37,23 @@ You need to be assigned permissions in the Office 365 Security & Compliance Cent
3737

3838
### Example 1
3939
```powershell
40-
{{ Add example code here }}
40+
Get-UnifiedAuditLogRetentionPolicy | Sort-Object -Property Priority -Descending | FL Priority,Name,Description,RecordTypes,Operations,UserIds,RetentionDuration
4141
```
4242

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

4553
## PARAMETERS
4654

4755
### -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).
56+
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).
4957

5058
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\>".
5159

@@ -63,7 +71,7 @@ Accept wildcard characters: False
6371
```
6472
6573
### -RecordType
66-
The RecordType parameter filters the policy results by the record types that are defined in the policy. Valid values are:
74+
The RecordType parameter filters the results by the record types that are defined in the policy. Valid values are:
6775
6876
- AeD
6977
@@ -213,8 +221,6 @@ The RecordType parameter filters the policy results by the record types that are
213221
Type: AuditRecordType
214222
Parameter Sets: (All)
215223
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
218224

219225
Required: False
220226
Position: Named

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

Lines changed: 21 additions & 19 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. 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).
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

@@ -38,15 +38,22 @@ You need to be assigned permissions in the Office 365 Security & Compliance Cent
3838

3939
### Example 1
4040
```powershell
41-
{{ Add example code here }}
41+
New-UnifiedAuditLogRetentionPolicy -Name "Microsoft Teams Audit Policy" -Description "One year retention policy for all Microsoft Teams activities" -RecordTypes MicrosoftTeams -RetentionDuration TwelveMonths -Priority 100
4242
```
4343

44-
{{ Add example description here }}
44+
This example creates an audit log retention policy that retains all audit logs related to Microsoft Teams events for one year.
45+
46+
### Example 2
47+
```powershell
48+
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
49+
```
50+
51+
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.
4552

4653
## PARAMETERS
4754

4855
### -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 (").
56+
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 (").
5057

5158
```yaml
5259
Type: String
@@ -62,17 +69,15 @@ Accept wildcard characters: False
6269
```
6370
6471
### -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.
72+
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.
6673
6774
Valid values and the default value for this parameter depend on the number of existing policies. For example, if there are 8 existing policies:
6875
69-
- Valid priority values for the existing 8 policies are from 0 through 7.
76+
- Valid priority values for the existing 8 policies are from 7 through 0.
7077
71-
- Valid priority values for a new policy (the 9th policy) are from 0 through 8.
78+
- Valid priority values for a new policy (the 9th policy) are from 8 through 0.
7279
73-
- The default value for a new policy (the 9th policy) is 8.
74-
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.
80+
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).
7681
7782
```yaml
7883
Type: Int32
@@ -88,7 +93,7 @@ Accept wildcard characters: False
8893
```
8994
9095
### -RetentionDuration
91-
The RetentionDuration parameter specifies how long the unified audit log records are kept. Valid values are:
96+
The RetentionDuration parameter specifies how long audit log records are kept. Valid values are:
9297
9398
- ThreeMonths
9499
@@ -133,7 +138,7 @@ Accept wildcard characters: False
133138
```
134139
135140
### -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 (").
141+
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 (").
137142
138143
```yaml
139144
Type: String
@@ -149,9 +154,9 @@ Accept wildcard characters: False
149154
```
150155
151156
### -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).
157+
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). 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.
153158
154-
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\>".
159+
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\>".
155160
156161
```yaml
157162
Type: MultiValuedProperty
@@ -167,7 +172,7 @@ Accept wildcard characters: False
167172
```
168173
169174
### -RecordTypes
170-
The RecordTypes parameter specifies the record type labels that are preserved by the policy. Valid values are:
175+
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:
171176
172177
- AeD
173178
@@ -313,13 +318,10 @@ The RecordTypes parameter specifies the record type labels that are preserved by
313318
314319
- Yammer
315320
316-
You can specify multiple values separated by commas.
317-
318321
```yaml
319322
Type: MultiValuedProperty
320323
Parameter Sets: (All)
321324
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
323325
Applicable: Office 365 Security & Compliance Center
324326

325327
Required: False
@@ -330,7 +332,7 @@ Accept wildcard characters: False
330332
```
331333
332334
### -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.
335+
The UserIds parameter specifies the audit logs that are retained by the policy based on the ID of the user who performed the action.
334336
335337
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\>".
336338

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)