sytone / OneNotePowerShellProvider

A PowerShell provider for OneNote.
Other
33 stars 16 forks source link

Minor updates for PowerShell 5.1 #5

Closed jazzdelightsme closed 4 years ago

jazzdelightsme commented 4 years ago

"Snapins" aren't really a thing anymore; Import-Module is what we need to do to load the module.

StrictMode is a thing now. Some people use it, some don't, but these scripts were written assuming it was off, so let's make it explicit.

There was no join-string function... don't know if that was something that existed in older PS versions or what.

jazzdelightsme commented 4 years ago

I should mention that with these changes the Enable-OneNote.ps1 import script now works and tests pass (or at least don't generate errors) on Win10/PowerShell 5.1 with StrictMode turned on. (OneNote 2016: 16.0.12624.20348)