You can refer to the document here for a tutorial on how to Export user data from Microsoft Planner.
The exporting process is done through Windows PowerShell as following:
- Download and unzip the Planner user data export files on your local drive. Make sure the files are unblocked in the folder.
- Run Windows PowerShell as Administrator and then execute the following cmdlets one by one:
PS> Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope Process
> Type Y
PS> Import-module "<location of the .psm1 file>"
PS> Export-PlannerUserContent -UserAadIdOrPrincipalName <user's AADId or UPN> -ExportDirectory <output location>
Make sure you use a Global Admin account for the prompted credential.
As for OneNote, there is currently no PowerShell/PnP PowerShell cmdlets from Microsoft to export OneNote notebooks or pages.
You can take a look at an article here for a sample to Bulk export OneNote 2013/2016 pages as HTML.
*Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link. *
If an Answer is helpful, please click "Accept Answer" and upvote it.
**Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread. **