Skip to content

Commit 70e3e36

Browse files
authored
Update Get-ReviewItems.md
1 parent 7eba286 commit 70e3e36

File tree

1 file changed

+50
-14
lines changed

1 file changed

+50
-14
lines changed

exchange/exchange-ps/exchange/Get-ReviewItems.md

Lines changed: 50 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ ms.reviewer:
1414
## SYNOPSIS
1515
This cmdlet is available only in the cloud-based service.
1616

17-
Use the Get-ReviewItems to ???.
17+
Use the Get-ReviewItems to retrieve a list of disposition review items that are either pending review or already disposed for a specific retention label. It can also be used to retrieve a list of disposed items for a specific record label.
18+
19+
This cmdlet is available only in the Mailbox Import Export role, and by default, the role isn't assigned to any role groups. To use this cmdlet, you need to add the Mailbox Import Export role to a role group (for example, to the Organization Management role group). For more information, see [Add a role to a role group](https://learn.microsoft.com/Exchange/permissions/role-groups#add-a-role-to-a-role-group).
1820

1921
For information about the parameter sets in the Syntax section below, see [Exchange cmdlet syntax](https://learn.microsoft.com/powershell/exchange/exchange-cmdlet-syntax).
2022

@@ -31,19 +33,60 @@ Get-ReviewItems -TargetLabelId <String>
3133
## DESCRIPTION
3234
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://learn.microsoft.com/powershell/exchange/find-exchange-cmdlet-permissions).
3335

36+
The `Get-ReviewItems` cmdlet can be used to export a list of pending or disposed items from disposition review. To learn more about disposition review, see [Disposition of content](https://learn.microsoft.com/microsoft-365/compliance/disposition).
37+
3438
## EXAMPLES
3539

3640
### Example 1
41+
42+
```powershell
43+
$itemsPendingDisposition = Get-ReviewItems -TargetLabelId a8cbeaac-e7aa-42ed-8dba-54200537c9c9 -IncludeHeaders $true
44+
$formattedExportItems = $itemsPendingDisposition.ExportItems | ConvertFrom-Csv -Header $itemsPendingDisposition.Headers
45+
$formattedExportItems
46+
```
47+
48+
Retrieves the first page of items pending disposition for the label with an immutable ID of `a8cbeaac-e7aa-42ed-8dba-54200537c9c9`. The results will be converted to PSObject types objects for each item, and then output to the screen.
49+
50+
### Example 2
51+
3752
```powershell
38-
PS C:\> {{ Add example code here }}
53+
$itemsPendingDisposition = Get-ReviewItems -TargetLabelId a8cbeaac-e7aa-42ed-8dba-54200537c9c9 -IncludeHeaders $true -Disposed $true
54+
$formattedExportItems = $itemsPendingDisposition.ExportItems | ConvertFrom-Csv -Header $itemsPendingDisposition.Headers
55+
$formattedExportItems | Select Subject, Location, ReviewAction, Comment, DeletedBy, DeletedDate
3956
```
4057

41-
{{ Add example description here }}
58+
Retrieves all disposed items for the label with an immutable ID of `a8cbeaac-e7aa-42ed-8dba-54200537c9c9` and selects specific columns to output to the screen.
59+
60+
### Example 3
61+
62+
```powershell
63+
$itemsPendingDisposition = Get-ReviewItems -TargetLabelId a8cbeaac-e7aa-42ed-8dba-54200537c9c9 -IncludeHeaders $true
64+
$exportItems = $itemsPendingDisposition.ExportItems
65+
66+
While (![string]::IsNullOrEmpty($itemsPendingDisposition.PaginationCookie))
67+
{
68+
$itemsPendingDisposition = $itemsPendingDisposition = Get-ReviewItems -TargetLabelId a8cbeaac-e7aa-42ed-8dba-54200537c9c9 -IncludeHeaders $true -PagingCookie $itemsPendingDisposition.PaginationCookie
69+
$exportItems += $itemsPendingDisposition.ExportItems
70+
}
71+
72+
$exportItems | ConvertFrom-Csv -Header $itemsPendingDisposition.Headers | Export-Csv C:\temp\ItemsPendingDisposition.csv -NoTypeInformation
73+
```
74+
75+
Retrieves all items pending disposition for the label with an immutable ID of `a8cbeaac-e7aa-42ed-8dba-54200537c9c9`. If multiple pages of items exist, it will continue until no more pages exist. The results will be exported to a CSV file.
76+
77+
> [!NOTE]
78+
> While this cmdlet does not impose any limit to the number of items/pages that can be retrieved, other throttling may occur. For retrieving a large number of items, it is recommended to include breaks in your script to prevent throttling. The PagingCookie parameter can be used to pick up where the script left off after a break.
4279
4380
## PARAMETERS
4481

4582
### -TargetLabelId
46-
{{ Fill TargetLabelId Description }}
83+
The TargetLabelId parameter specifies the immutable ID of the label that you want to retrieve review items for.
84+
85+
To get the immutable ID for a particular label, you can use Exchange Online PowerShell:
86+
87+
```powershell
88+
Get-ComplianceTag <RetentionLabelName> | select ImmutableId
89+
```
4790

4891
```yaml
4992
Type: String
@@ -59,7 +102,7 @@ Accept wildcard characters: False
59102
```
60103
61104
### -Disposed
62-
{{ Fill Disposed Description }}
105+
Use the Disposed parameter to specify whether you want the cmdlet to return disposed items instead of items pending disposition.
63106
64107
```yaml
65108
Type: Boolean
@@ -75,7 +118,7 @@ Accept wildcard characters: False
75118
```
76119
77120
### -IncludeHeaders
78-
{{ Fill IncludeHeaders Description }}
121+
Use the IncludeHeaders parameter to specify whether you want headers to be returned as a property with the review items. These will be useful when converting to PSObject in PowerShell, or when exporting to CSV.
79122
80123
```yaml
81124
Type: Boolean
@@ -91,7 +134,7 @@ Accept wildcard characters: False
91134
```
92135
93136
### -PagingCookie
94-
{{ Fill PagingCookie Description }}
137+
Use the PagingCookie parameter to identify which page to retrieve. This is useful when a large number of items must be retrieved or as a method of starting where the last operation left off. The value for PagingCookie is returned in the PaginationCookie property each time the cmdlet is successfully run. If the PaginationCookie is null, there are no more items to retrieve.
95138
96139
```yaml
97140
Type: String
@@ -109,10 +152,3 @@ Accept wildcard characters: False
109152
### CommonParameters
110153
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).
111154
112-
## INPUTS
113-
114-
## OUTPUTS
115-
116-
## NOTES
117-
118-
## RELATED LINKS

0 commit comments

Comments
 (0)