{"id":13595331,"url":"https://github.com/vexx32/PSKoans","last_synced_at":"2025-04-09T10:33:22.021Z","repository":{"id":37851467,"uuid":"139899094","full_name":"vexx32/PSKoans","owner":"vexx32","description":"A simple, fun, and interactive way to learn the PowerShell language through Pester unit testing.","archived":false,"fork":false,"pushed_at":"2024-09-03T22:08:21.000Z","size":3403,"stargazers_count":1717,"open_issues_count":53,"forks_count":174,"subscribers_count":46,"default_branch":"main","last_synced_at":"2024-10-29T17:38:49.486Z","etag":null,"topics":["hacktoberfest","koans","pester","powershell","powershell-module"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vexx32.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"vexx32","patreon":"PSKoans","open_collective":null,"ko_fi":"joelsallow","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2018-07-05T20:50:52.000Z","updated_at":"2024-10-29T16:47:47.000Z","dependencies_parsed_at":"2024-11-06T06:34:46.140Z","dependency_job_id":"786dd161-57ab-4827-923f-8f8436cee75b","html_url":"https://github.com/vexx32/PSKoans","commit_stats":{"total_commits":896,"total_committers":53,"mean_commits":16.90566037735849,"dds":0.3035714285714286,"last_synced_commit":"1317701a7d2bf6ca7efff0eb21d3a3d0478740e9"},"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vexx32%2FPSKoans","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vexx32%2FPSKoans/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vexx32%2FPSKoans/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vexx32%2FPSKoans/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vexx32","download_url":"https://codeload.github.com/vexx32/PSKoans/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247386258,"owners_count":20930618,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","koans","pester","powershell","powershell-module"],"created_at":"2024-08-01T16:01:47.885Z","updated_at":"2025-04-09T10:33:21.993Z","avatar_url":"https://github.com/vexx32.png","language":"PowerShell","funding_links":["https://github.com/sponsors/vexx32","https://patreon.com/PSKoans","https://ko-fi.com/joelsallow"],"categories":["PowerShell","Interactive Learning","Languages"],"sub_categories":["Other Languages"],"readme":"# PowerShell Koans\n\n|                                      | Build Status                                                                                    |\n| ------------------------------------ | ----------------------------------------------------------------------------------------------- |\n| [![PSKoans Logo][logo-64]][logo-svg] | [![Build Status][build-badge]][build-link]\u003cbr/\u003e[![Coverage Status][coverage-badge]][build-link] |\n\n## About the Author\n\n### Joel Sallow\n\n- [Blog][blog]\n- [Twitter][twitter]\n\n## Synopsis\n\nInspired by Chris Marinos' **fantastic** [F# koans][fsharp-koans], the goal of the PowerShell koans is to teach you PowerShell by presenting you with a set of questions.\nEach [kōan][define-koan] (each question) is represented by a failing Pester test.\nYour goal is to make those tests pass by filling out the correct answer, or writing the correct code.\nThe koans start very simple to get you familiar with the basic concepts and progress towards more difficult.\nTeaching you multiple beginner, intermediate and advanced aspects of PowerShell in the process.\n\nTo get started please navigate to [prerequisites](#prerequisites) and [getting started](#getting-started).\n\n## Command Reference\n\nView the PSKoans [Command Reference Documentation][reference-docs].\n\n## Prerequisites\n\n- PowerShell version 5.1 / PowerShell 6+\n- NuGet (Windows only)\n- Pester v4.x\n\nWindows only: If you've never installed PowerShell modules before, you need to first install the NuGet PackageProvider to enable modules to be installed:\n\n```PowerShell\nInstall-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force\n```\n\nTo install the latest version of Pester, use the appropriate command for your version of PowerShell:\n\n```PowerShell\n# PS 5.1 (upgrade to latest Pester)\nInstall-Module Pester -Force -SkipPublisherCheck -Scope CurrentUser -MinimumVersion 5.0.2\n\n# PS 6.0+ (Install Pester under current user)\nInstall-Module Pester -Scope CurrentUser -MinimumVersion 5.0.2\n```\n\n## Getting Started\n\n### Install from Gallery\n\n```PowerShell\nInstall-Module PSKoans -Scope CurrentUser\n```\n\n### Or Download the Repo\n\n1. `git clone` the repository into your desired directory, or download the module zip file from the build artifacts available on [this page](https://dev.azure.com/SallowCode/PSKoans/_build/latest?definitionId=1).\n2. From a normal powershell session run `Get-ChildItem -Recurse | Unblock-File` in that directory to remove the \"downloaded from internet\" flag that blocks them from running.\n3. Check `Get-ExecutionPolicy`: if it says 'Restricted' or 'Undefined', you need to also run `Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser` in order to allow the scripts to run.\n4. Add the repository folder to `$env:PSModulePath` so that PowerShell can see it.\n   - From the repository main folder, run: `$env:PSModulePath = \"$(Get-Location)$([IO.Path]::PathSeparator)${env:PSModulePath}\"`\n\n## Start your Journey\n\n### 1. Run `Show-Karma` to start your journey towards PowerShell enlightenment\n\nYou will be presented with a page describing your goal:\n\n![Show-Karma result screen, showing zero completed koans][show-karma-1]\n\nInspect the red messages carefully, most importantly the last one.\nThe error message contains path to the file that you need to edit in order to progress forward.\nIn this case, you'll need to examine `Introduction\\AboutAssertions.Koans.ps1`.\n\n### 2. Run `Show-Karma -Contemplate` to open your Koans folder\n\nNavigate to `Introduction\\AboutAssertions.Koans.ps1`. Near the top you'll see:\n\n```powershell\nIt 'is a simple comparison' {\n    # Some truths are absolute.\n    $____ | Should -Be $true\n}\n```\n\nThe `$___` represents a blank for you to fill, and `| Should -Be $true` shows the expected result.\nTo pass this koan you need to replace `$____` with `$true` to fulfil the assertion: `$true | Should -Be $true`\n\n### 3. Run `Show-Karma` again to see how you did\n\nYou passed your first koan!\nYou'll notice that your overall progress updated to `1/635` and you are presented with the next challenge.\n\n![Show-Karma result screen after completing a single koan, showing one completed koan][show-karma-2]\n\n You are on your own from here, but the progression should be fairly smooth.\n If you need help, you can always ask around in the PowerShell communities:\n\n- [Slack][ps-slack]\n- [Discord][ps-discord]\n- [Reddit][ps-reddit]\n- [Twitter][ps-twitter]\n- [PowerShell.org Forums][ps-forum]\n\nGood luck!\n\n## Backing Up Your Progress\n\nYou can see the current folder your copy of the koans is stored in by calling `Get-PSKoanLocation`.\nIf you want to save a backup of your current progress, simply make a copy of this folder and store it in a safe location.\n\nFor example:\n\n```powershell\nGet-PSKoanLocation | Copy-Item -Recurse -Destination \"D:\\Backups\\PSKoans\"\n```\n\n## Maintaining Multiple Koan Libraries\n\nJust as you can `Get-PSKoanLocation`, you can also use `Set-PSKoanLocation` to change the directory that PSKoans will look for.\nThis allows you to have any number of in-progress libraries of koans on a single machine without moving any folders.\n\nHowever, be aware that the module does not retain any information about _previous_ locations specified, only the current location.\nTo change the set location, call `Set-PSKoanLocation` with the path you would like to set.\nIf the specified folder does not exist, it will be created the next time you call `Show-Karma`.\n\n```powershell\n$oldLocation = Get-PSKoanLocation\nSet-PSKoanLocation \"~/New/PSKoans\"\n\n# Call Show-Karma to create the directory and populate it with a fresh koan library\nShow-Karma\n\n# Restore the old location\n$newLocation = Get-PSKoanLocation\nSet-PSKoanLocation $oldLocation\n\n# Call Show-Karma again to check the progress on the old library once again\nShow-Karma\n```\n\n## Uninstallation\n\nYou can uninstall the PSKoans module the usual way you uninstall PowerShell modules, with `Uninstall-Module -Name PSKoans`\nThis **will not** remove your copy of the koans themselves, which are stored in your user folder, and it will also not remove the configuration file.\n\nTo completely remove all of these files, call these commands _before_ you uninstall PSKoans:\n\n```powershell\n# To remove configuration settings\nRemove-Item -Path \"~/.config/PSKoans\" -Recurse\n\n# To remove your koan files (THIS WILL COMPLETELY DELETE YOUR PROGRESS)\nGet-PSKoanLocation | Remove-Item -Recurse\n```\n\n## Contributing\n\nIf you would like to contribute to PSKoans, please check out the [Contributing][contributing] document.\n\n## Support the Project\n\nIf you would like to support the project, you can:\n\n- [Sponsor me on Github][github-sponsor]\n- [Become a Patreon Patron][patreon]\n- [Donate with Ko-fi][ko-fi]\n\n[blog]: https://vexx32.github.io\n[build-badge]: https://dev.azure.com/SallowCode/PSKoans/_apis/build/status/PSKoans%20CI?branchName=main\n[build-link]: https://dev.azure.com/SallowCode/PSKoans/_build/latest?definitionId=1\u0026branchName=main\n[contributing]: CONTRIBUTING.md\n[coverage-badge]: https://img.shields.io/azure-devops/coverage/SallowCode/PSKoans/1\n[define-koan]: https://en.wikipedia.org/wiki/K%C5%8Dan\n[fsharp-koans]: https://github.com/ChrisMarinos/FSharpKoans\n[github-sponsor]: https://github.com/sponsors/vexx32\n[ko-fi]: https://ko-fi.com/joelsallow\n[logo-64]: images/logo-64px.png\n[logo-128]: images/logo-128px.png\n[logo-full]: images/logo.png\n[logo-svg]: images/logo.svg\n[patreon]: https://patreon.com/PSKoans\n[ps-discord]: https://j.mp/psdiscord\n[ps-forum]: https://powershell.org/forums/forum/windows-powershell-qa/\n[ps-reddit]: https://www.reddit.com/r/PowerShell/\n[ps-slack]: https://j.mp/psslack\n[ps-twitter]: https://twitter.com/hashtag/powershell\n[reference-docs]: docs/PSKoans.md\n[show-karma-1]: images/Show-Karma_1.png\n[show-karma-2]: images/Show-Karma_2.png\n[twitter]: https://twitter.com/vexx32\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvexx32%2FPSKoans","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvexx32%2FPSKoans","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvexx32%2FPSKoans/lists"}