Skip to content

Commit 463410d

Browse files
authored
Update Search-UnifiedAuditLog.md
1 parent dccd80d commit 463410d

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

exchange/exchange-ps/exchange/Search-UnifiedAuditLog.md

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ If you want to programmatically download data from the Microsoft 365 audit log,
4747

4848
This cmdlet is available in Office 365 operated by 21Vianet, but it won't return any results.
4949

50+
The OutVariable parameter accepts objects of type ArrayList. Here's an example of how to use it:
51+
52+
`$start = (Get-Date).AddDays(-1); $end = (Get-Date).AddDays(-0.5); $auditData = New-Object System.Collections.ArrayList; Search-UnifiedAuditLog -StartDate $start -EndDate $end -OutVariable +auditData | Out-Null`
53+
5054
You need to be assigned permissions before you can run this cmdlet. Although this topic lists all parameters for the cmdlet, you may not have access to some parameters if they're not included in the permissions assigned to you. To find the permissions required to run any cmdlet or parameter in your organization, see [Find the permissions required to run any Exchange cmdlet](https://docs.microsoft.com/powershell/exchange/find-exchange-cmdlet-permissions).
5155

5256
## EXAMPLES
@@ -346,15 +350,6 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
346350

347351
###
348352

349-
The OutVariable parameter accepts objects of type ArrayList. Here's an example of how to use it:
350-
351-
```powershell
352-
$start = (Get-Date).AddDays(-1)
353-
$end = (Get-Date).AddDays(-0.5)
354-
$auditData = New-Object System.Collections.ArrayList
355-
Search-UnifiedAuditLog -StartDate $start -EndDate $end -OutVariable +auditData | Out-Null
356-
```
357-
358353
## NOTES
359354

360355
## RELATED LINKS

0 commit comments

Comments
 (0)