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.
Actually, even the export no longer works. I have currently opened a ticket with Office 365 to find out why. There is:
New-ComplianceSearchAction -SearchName $SearchName -Export
A parameter cannot be found that matches parameter name 'Export'.
The updated help still shows the parameter, and the TechNet page has not been updated. However, search for it in the Command modules help in ISE, the check box for Export has now disappeared in the last week as well as the ArchiveFormat parameter. Can't find anything about it.
The compliance search functionality is being rewritten at present. This might have had the side-effect of removing the parameter. I have pinged the development team to ask.
- TonyRedmondJan 06, 2018MVP
I doubt it. The problem is that exported results are in temporary Azure storage that is accessed by a key. Handling that key in a secure manner to make it available and usable to a PowerShell cmdlet is something I do not think the developers have considered yet.
- Thijs LecomteJan 06, 2018Copper ContributorThank you!
Do you know if it Will je possible to download results through powershell?