Forum Discussion
How to use New-ComplianceSearchAction -Export to export results to sharepoint,download them locally?
We need to do a compliance project. We want to export the search results to a specific location (such as SharePoint) through PowerShell, and then download them locally. How do I use the PowerShell command New-ComplianceSearchAction -Export to export search results to sharepoint and then download them locally? Both use the PowerShell command.
I saw this sample in offical documentation:
New-ComplianceSearchAction -SearchName "Case 321 All Sites" -Export -SharePointArchiveFormat SingleZip -ExchangeArchiveFormat PerUserPst
But it doesn't say how to export the results to a specific location (such as SharePoint) , and how to download them locally.
Any help or guidance would be greatly appreciated!
- You cannot export to SPO site, just to a local drive. The example above is configuring the type of export for SPO data, it's not designating the export location.
- gukang83035207Copper Contributor
VasilMichev Thanks a lot for your reply. To be honest, I want to export the data and download it in my local. Could you help to give a sample command, please?
- The only supported method to download the results is via the eDiscovery tool. If you are looking to automate the process full, you can try the method outlined here: https://techcommunity.microsoft.com/t5/microsoft-365/export-to-pst-via-powershell/m-p/95007