Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs (readme): Add FAQ on temporarily bypassing Powershell Execution Policy #171

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,13 @@ The powershell script `ConvertOneNote2MarkDown-v2.ps1` will utilize the OneNote
.\ConvertOneNote2MarkDown-v2.ps1 -Verbose
```

* If you see an error about scripts being blocked, run this line (don't worry, this only allows the current powershell process to bypass security):
* If you see an [error about scripts being blocked on the system](#error-file-convertonenote2markdownps1-cannot-be-loaded-because-running-scripts-is-disabled-on-this-system), run this line (don't worry, this only allows the current powershell process to bypass security):

```powershell
Set-ExecutionPolicy Bypass -Scope Process -Force
```

* If you see any errors, check the [FAQ](#faq).
* If you see any other errors, check the [FAQ](#faq).
1. If you chose to use a configuration file `config.ps1`, skip to the next step. If you did not choose to use a configuration file, the script will ask you for configuration interactively.
* It starts off asking whether to do a dry run. This is useful for trying out different settings until you find one you like.
* It will ask you for the path to store the markdown folder structure. Please use an empty folder. If using VS Code, you might not be able to paste the filepath - right click on the blinking cursor and it will paste from clipboard. Use a full absolute path.
Expand Down Expand Up @@ -180,6 +180,14 @@ 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: `File ConvertOneNote2Markdown.ps1 cannot be loaded because running scripts is disabled on this system.`

A: Windows disables Powershell (`.ps1`) scripts by default for security reasons. To allow running `.ps1` scripts temporarily only for the current Powershell session, run:

```powershell
Set-ExecutionPolicy Bypass -Scope Process -Force
```

### Error: `Error HRESULT E_FAIL has been returned from a call to a COM component`

Cause: Powershell `7.1.x` and above does not support loading Win32 GAC Assemblies.
Expand Down