diff --git a/ConvertOneNote2MarkDown-v2.ps1 b/ConvertOneNote2MarkDown-v2.ps1 index ac8b727..740cf53 100644 --- a/ConvertOneNote2MarkDown-v2.ps1 +++ b/ConvertOneNote2MarkDown-v2.ps1 @@ -15,7 +15,7 @@ Function Validate-Dependencies { # Validate Powershell versions. Supported version are between 5.x (possibly lower) and 7.0.x if ($PSVersionTable.PSVersion -ge [version]'7.1') { - throw "Unsupported Powershell version $( $PSVersionTable.PSVersion ). Supported versions are between Powershell 5.x and 7.0.x. See README.md for instructions to install Powershell 7.0.x" + throw "Unsupported Powershell version $( $PSVersionTable.PSVersion ), because it does not support importing Win32 GAC Assemblies. Supported versions are between Powershell 5.x and 7.0.x. See README.md for instructions to install Powershell 7.0.x" } # Validate assemblies diff --git a/README.md b/README.md index 84c1f25..94fcba0 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,8 @@ The powershell script `ConvertOneNote2MarkDown-v2.ps1` will utilize the OneNote * Windows Powershell 5.x, or [Powershell Core 6.x up to 7.0.x](#q-how-to-install-and-run-powershell-70x) - * Note: There is no need to install Windows Powershell, since it is already included in Windows 10 / 11 (click Start > `Windows Powershell`). Installing Powershell Core is optional. + * Note: Windows Powershell it is already included in Windows 10 / 11 (click Start > `Windows Powershell`). Installing Powershell Core is optional. + * Note: [Powershell Core 7.1 and above is unsupported](#q-why-is-powershell-core-71-and-above-unsupported), because Microsoft has removed support for importing Win32 GAC Assemblies since Powershell 7.1. * Note: Do not use Windows Powershell ISE, because it [does not support long paths](#error-convert-onenotepage--error-while-renaming-image-file-name-references-to-xxxpng-illegal-characters-in-path). * Microsoft OneNote >= 2016 (To be clear, this is the Desktop version, not the Windows Store version. Can be downloaded for free [here](https://www.onenote.com/Download) @@ -168,11 +169,9 @@ A: If there are errors opening OneNote as Administrator, just open it normally w A: The script cannot detect notebooks which are not yet open in OneNote. Use `File > Open` in OneNote to open all OneNote notebooks that you want to convert, and ensure they are all fully synchronized before running the conversion. This applies to local OneNote notebooks and cloud OneNote notebooks (E.g. OneDrive or Microsoft Teams). -### Error: `Unsupported Powershell version` +### Q: WHy is Powershell Core 7.1 and above unsupported? -Cause: Powershell `7.1.x` and above does not support loading Win32 GAC Assemblies. - -Solution: Use a version of Powershell between `5.x` and `7.0.x`. See [here](#q-how-to-install-and-run-powershell-70x). +A: Powershell `7.1.x` and above no longer supports loading Win32 GAC Assemblies for interacting with the OneNote Desktop APIs. Instead, use a version of Powershell between `5.x` and `7.0.x`. See [here](#q-how-to-install-and-run-powershell-70x). ### Error: `Error HRESULT E_FAIL has been returned from a call to a COM component`