Welcome to MSDN Blogs Sign in | Join | Help

OneNote PowerShell Provider by Brian Dewey

I always feel honoured to work in Office because there are so many incredible people working throughout the org.  In particular I met Brian Dewey a few months ago; Brian is a fellow PM in Office and a big OneNote fan and a very savvy geek.  What happens when you combine those traits?  Well Brian created a OneNote PowerShell Provider : )   Here is what he has to say about it:

I now use these programs all the time. And like a Reese’s Peanut Butter Cup, I wondered if these two great technologies would be even better if brought together? So I’ve tried to bring them together in the form of a OneNote PowerShell provider. This is a PowerShell extension that lets you create and manipulate OneNote notebooks, sections, and pages from PowerShell. You can use provider to do some interesting automation using OneNote.

He goes on to explain how he has a script which will email members of shared notebook that there are new edits in that notebook all with a couple hundred lines of code.  This is so easy since PowerShell does an amazing job with XML and OneNote exports XML, after reading what Brian has done I am really excited to learn more about how PowerShell works.  What is even better is that Brian is releasing the source code (so I can learn) as well as compiled versions of his provider, see here:

If you want to play with the OneNote PowerShell extension, I’m making it publicly available under the Microsoft Community License. You can find the binary files here: OneNotePowershell.msi. The source files are here: OnPsProvider-1158.zip.

If you install the provider, it will install several sample scripts as well, including the script I’ve been discussing here (Get-OneNoteDigest.ps1).

If you just want to read the documentation that comes with the provider and the scripts, it exists in OneNote format: OneNote PowerShell Documentation.

If you want to use PowerShell with OneNote to build useful tools, let me know. I’ll be curious to see how you use it.

This is just so cool!  Brian has binaries, source and a documentation notebook (in OneNote format to boot!).  Check it out here: OneNote PowerShell Provider.  Great work Brian!

Update on 2008-Mar-11:  I just heard from Brian that some files were moved around and you can now find the files here: http://cid-83dfdc4530b17dd8.skydrive.live.com/browse.aspx/Open%20Source%20Projects.

Updated on 2008-Mar-14 - With this link: http://bdewey.com/2007/07/18/onenote-powershell-provider/.

Published Thursday, July 19, 2007 9:29 AM by descapa

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# Tablet PC and Ultra-Mobile PC News and Reviews - GottaBeMobile.com - Automation and OneNote 2007

# Automation and OneNote 2007

This looks very interesting if you are looking for a way to automate some of your OneNote 2007 activities

Thursday, July 19, 2007 8:26 AM by Pocket.Net - Mobile 2.0

# re: OneNote PowerShell Provider by Brian Dewey

flakey

Does not work consistently unfortunately. Great idea though.

Monday, August 18, 2008 9:02 PM by SS

# re: OneNote PowerShell Provider by Brian Dewey

When I say it doesn't work consistently, not entirely correct...what I mean is the PSdrive behaviour is strange, though it can be worked around by ensuring the location is specified explicitly on every command. Must ensure that set-location is not "OneNote:"

PS C:\Onenote> set-location onenote:

PS OneNote:> dir

Get-ChildItem : Cannot find path 'OneNote\OneNote:' because it does not exist.

At line:1 char:4

+ dir <<<<

PS OneNote:> set-location onenote:\

PS OneNote:> dir

Get-ChildItem : Cannot find path 'OneNote\OneNote:' because it does not exist.

At line:1 char:4

+ dir <<<<

PS OneNote:> set-location "onenote:\client requests"

PS OneNote:\client requests> dir

Get-ChildItem : Cannot find path 'OneNote\OneNote:\client requests' because it does not exist.

At line:1 char:4

+ dir <<<<

PS OneNote:\client requests>

Would really love if you could correct me and/or fix this, as otherwise, this provider is excellent.

Monday, August 18, 2008 10:44 PM by Simon Savva

# re: OneNote PowerShell Provider by Brian Dewey

Sorry to post again, but I think I found a solution...

Enable-OneNote

Remove-PsDrive OneNote

New-PSDrive -Name OneNote -PsProvider OneNote -Root " "

...traversing the OneNote store works as described now...I just hope the fix hasn't introduced any new problems ;-)

Tuesday, August 19, 2008 12:47 AM by Simon Savva

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker