Export-OneNote

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.

Technorati Tags: ,
Advertisements
This entry was posted in Powershell. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s