Skip to content

Commit df1e9bc

Browse files
authored
Update Export-ContentExplorerData.md
Additional tips to improve the cmdlet usage
1 parent 15da6bd commit df1e9bc

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

exchange/exchange-ps/exchange/Export-ContentExplorerData.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,13 @@ The output of this cmdlet contains the following information:
4343

4444
To use this cmdlet in Security & Compliance PowerShell, you need to be assigned permissions. For more information, see [Permissions in the Microsoft Purview compliance portal](https://learn.microsoft.com/purview/microsoft-365-compliance-center-permissions).
4545

46+
## Scripting
47+
- If the requirement is to export multiple SITs/Labels, it is recommended to not use a single script to export everything. Instead create a script for one SIT/Label and then re-use the same script for each SIT/Label in each workload required.
48+
- When retrying the script, make sure to reconnect to the session first. This is because the session’s token expires after about an hour, which can cause the cmdlet to fail. To fix this issue, reconnect to the session before retrying the script. If the script fails, restart it using the last page cookie returned to continue the export from where it left off.
49+
50+
>[!Tip]
51+
>To support unattended scripts running for long time you can leverage [certificate-based authentication (CBA)](https://learn.microsoft.com/en-us/powershell/exchange/app-only-auth-powershell-v2?view=exchange-ps) flow
52+
4653
## EXAMPLES
4754

4855
### Example 1
@@ -90,7 +97,7 @@ Accept wildcard characters: False
9097
```
9198
9299
### -Aggregate
93-
{{ Fill Aggregate Description }}
100+
The Aggregate parameter can be used to get the folder level aggregated numbers instead of getting the details at item level. This will significantly reduce the export time, and if needed internal items of a folder can be downloaded by running the cmdlet for specific folders. When -Aggregate parameter is passed along with TagName, TagType and Workload parameters, the cmdlet will return the list of SiteUrls (ODB/SPO) / UPNs (EXO/Teams) and the count of items stamped with that tag.
94101
95102
```yaml
96103
Type: SwitchParameter
@@ -137,6 +144,10 @@ Accept pipeline input: False
137144
Accept wildcard characters: False
138145
```
139146
147+
>[!Note]
148+
>In case of empty folders or folders with less files it will cause the cmdlet to run for a long time inorder to get 'PageSize' count of results. To prevent this, the Cmdlet will return the data of 5 folders or number of records as mentioned in the PageSize, whichever is completed first.
149+
>E.g. if there are 10 folders with 1 record each then in single execution cmdlet will return 5 record of top 5 folders and in the next execution using page cookie it will return 5 records from the remaining 5 folders even if PageSize mentioned is 10.
150+
140151
### -SiteUrl
141152
The SiteUrl parameter specifies the site URL to export file details from.
142153

0 commit comments

Comments
 (0)