Skip to content

This project aims to provides a collection of scripts and functions for various applications and tasks that students may use or encounter, such as TheBrain, Evernote and OneNote on Windows.

License

Notifications You must be signed in to change notification settings

chriskyfung/My-PowerShell-Scripts

My PowerShell Scripts

This project provides a collection of PowerShell scripts that students may find useful or life hacking for various applications and tasks.

Features

Some of the features of the project are:

  • OneNote: You can use scripts to automate the creation, editing, and organization of notes, notebooks, and sections in OneNote.
  • TheBrain: You can use scripts to interact with theBrain, a powerful software for mind mapping and knowledge management.
  • Windows: You can use scripts to customize windows settings, create shortcuts, manage updates, and more.
  • Bluestacks: You can use scripts to perform tasks and actions in Bluestacks, an emulator that lets you run Android apps on PC.
  • And more: You can use scripts for other purposes, such as web scraping, file management, text processing, etc.

Requirements

To run these scripts, you need:

  • Windows 10 or 11
  • PowerShell 5.1 or higher (tested against 5.1 and 7.4)
  • Microsoft Onenote 2016 or higher
  • TheBrain 13 or higher
  • Some third-party PowerShell modules (see the scripts for details)

Usage

To use the scripts in this project, you need to have PowerShell 5.1 or later installed on your computer. The programs that you wish to use, like OneNote, theBrain, Bluestacks, etc., must also be installed on your PC.

To run a script or function, you can either open PowerShell and type the name of the script or function, or you can right-click on the script file and select “Run with PowerShell”.

Basic Steps

  1. Clone or download this repository to your computer
  2. Open PowerShell and change the current directory to the repository folder
  3. Run the scripts with the appropriate parameters (see the scripts for details)
  4. Enjoy!

NOTE
You may need to change the execution policy of PowerShell to allow running scripts from external sources. You can do this by typing Set-ExecutionPolicy RemoteSigned in PowerShell.

For more details on how to utilize the scripts for a particular application, you can review the README files in the relevant folder.

Testing

This project uses Pester (v5.7.1) for testing and PSScriptAnalyzer for static analysis.

Running Tests

To run all checks, including PSScriptAnalyzer and Pester tests, execute the build script from the project root:

.\Build.ps1

Writing Tests

When contributing, please follow modern Pester v5 conventions.

  • Structure: Use Describe and It blocks to structure your tests. (Read more)
  • Assertions: Use Should to check the results of your code. (Read more)
  • Mocking: Isolate your tests by replacing dependencies with Mock. (Read more)

Key Convention: Direct mocking of .NET static methods is not supported by Pester. Please wrap the static method in a PowerShell function and mock the wrapper instead.

Debugging in Visual Studio Code

To debug, set a breakpoint and use the Run and Debug view (Ctrl+Shift+D). The existing launch.json provides configurations for running the current file or its tests.

Disclaimer

These scripts are provided as-is, without any warranty or support. Use them at your own risk. I am not responsible for any damage or data loss that may occur from using these scripts. Always backup your data before running any script.

You may also like

fleschutz/PowerShell - Mega collection of 500+ useful cross-platform PowerShell scripts (.ps1)

brianary/scripts - General-purpose PowerShell, F, and other scripts

microsoft/PowerShellForGitHub - Microsoft PowerShell wrapper for GitHub API

PoshlandPro/PSNotion - A Powershell Module for Notion

dfinke/ImportExcel - A PowerShell module to importexport Excel spreadsheets, without Excel

pcgeek86/youtube - A PowerShell module to manage YouTube content via the official REST API.

Contributing

The project is open-source and welcomes contributions from anyone who is interested in improving the productivity of learning activities with PowerShell. For more details on how to contribute to this project, please read the CONTRIBUTING.md file located in the project root directory.

License

The project is licensed under the GPLv3 License. See the License file for details.

About

This project aims to provides a collection of scripts and functions for various applications and tasks that students may use or encounter, such as TheBrain, Evernote and OneNote on Windows.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Sponsor this project

  •