Skip to content

Commit 0a40602

Browse files
authored
Merge pull request MicrosoftDocs#1980 from YuriySamorodov/patch-10
OutVariable usage example added
2 parents 9f2213f + c010fb3 commit 0a40602

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

exchange/exchange-ps/exchange/policy-and-compliance-audit/Search-UnifiedAuditLog.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,14 @@ Accept wildcard characters: False
364364
### CommonParameters
365365
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
366366
367+
> [!NOTE] `-OutVariable` accepts objects of `ArrayList` list type.
368+
> Below is a quick example of how `-OutVariable` can be used:
369+
> ```
370+
> $start = (Get-Date).AddDays(-1)
371+
> $end = (Get-Date).AddDays(-0.5)
372+
> $auditData = New-Object System.Collections.ArrayList
373+
> Search-UnifiedAuditLog -StartDate $start -EndDate $end -OutVariable +auditData | Out-Null
374+
> ```
367375
## INPUTS
368376

369377
###

0 commit comments

Comments
 (0)