Forum Discussion
Export to PST via Powershell
- Aug 10, 2017
No way to do it without going to the SCC and initializing the download via the click-one app, sorry. Perhaps you can automate it via AzCopy or some other tool that takes container/token as input - you can get those via the Result property of Get-ComplianceSearchAction.
As for the cmdlet, make sure you also use the -Format parameter!
The Format parameter specifies the format of the search results when you use the Export switch. Valid values are:
FxStream Export to PST files. This is the only option that's available when you export search results from the Security & Compliance Center.
Mime Export to .eml messsage files. This the default value when you use cmdlets to export the search results.It's most likely what causes the issue in your case.
No way to do it without going to the SCC and initializing the download via the click-one app, sorry. Perhaps you can automate it via AzCopy or some other tool that takes container/token as input - you can get those via the Result property of Get-ComplianceSearchAction.
As for the cmdlet, make sure you also use the -Format parameter!
The Format parameter specifies the format of the search results when you use the Export switch. Valid values are:
FxStream Export to PST files. This is the only option that's available when you export search results from the Security & Compliance Center.
Mime Export to .eml messsage files. This the default value when you use cmdlets to export the search results.
It's most likely what causes the issue in your case.
So you are saying there is no way to export a user's mailbox through PowerShell?
Kind regards
Thijs
- DeletedJan 03, 2018
To clarify, everything up to the physical exporting can be scripted with basic existing cmdlets. To do the actual export, you would have to write some additional code to do this via the GUI, as there is currently no cmdlet to grab the export and save it locally.
Here is the scriplet regarding this function:
# Create Compliance Search - Export Email
$SearchName = "Export - " + $term.Name
New-ComplianceSearch -ExchangeLocation $user365.WindowsLiveID -Name $SearchName
# Start Compliance Search and wait to complete
Start-ComplianceSearch $SearchName
do
{
Start-Sleep -s 5
$complianceSearch = Get-ComplianceSearch $SearchName
}
while ($complianceSearch.Status -ne 'Completed')
# Create Compliance Search in exportable format
New-ComplianceSearchAction -SearchName $SearchName -EnableDedupe $true -Export -Format FxStream -ArchiveFormat PerUserPST
#Wait for Export to complete
do
{
Start-Sleep -s 5
$complete = Get-ComplianceSearchAction -Identity $ExportName
}
while ($complete.Status -ne 'Completed')
- Thijs LecomteJan 03, 2018Copper ContributorThank you for the answer.
I was indeed looking for a way to physical exporting for the search. Guess I will have to do that manually. - Jethro SEGHERSJan 03, 2018Brass Contributor
Brad to the rescue
- jfrlJan 04, 2018Copper Contributor
once exported how can I download the PST, please your urgent help
- Thijs LecomteJan 04, 2018Copper Contributor
In Compliance and Security center go to your export and click download on the right
- Jethro SEGHERSJan 03, 2018Brass Contributor
Through E-Discovery yes, not through regular Exchange Online.
There are third-party tools out there that have created tools for this.
- Thijs LecomteJan 03, 2018Copper ContributorIs it possible for me to create a PS script that downloads PST's through e discovery?
- escuphamJan 04, 2018Steel Contributor
Are there eDiscovery PowerShell commands to do the export? We want to export the content search results from eDiscovery content searches to a shared drive for investigators to access.
- Thijs LecomteJan 05, 2018Copper Contributor
I have searched a lot but I don't think there is a way to download it through PS