The Export-OneNote cmdlet does what it says and exports information held in OneNote notebooks. There are a number of very nice features about this cmdlet. The main one is the number of formats to which data can be exported – MHT, PDF,DOC, OnePKG, XPS and Web with RSS mentioned but not yet supported. This gives the numerous possibilities.
To export a single section try
Export-OneNote -Path "onenote:technicalgeneral" -OutputPath ‘c:testgeneral.pdf’ -Format pdf
where we supply a onenote path to the section and where we want the file to be produced and in which format.
If we want to export a whole notebook then
Get-ChildItem -Path "onenote:technical" | Export-OneNote -Outputpath "c:test" -Format pdf
will do that for us. If there are multiple pages in the section they are preserved as multiple pages in the exported file.