{"id":13596514,"url":"https://github.com/PoshCode/PowerShellPracticeAndStyle","last_synced_at":"2025-04-09T16:32:54.391Z","repository":{"id":14600010,"uuid":"17317123","full_name":"PoshCode/PowerShellPracticeAndStyle","owner":"PoshCode","description":"The Unofficial PowerShell Best Practices and Style Guide","archived":false,"fork":false,"pushed_at":"2023-05-19T02:50:39.000Z","size":334,"stargazers_count":2299,"open_issues_count":38,"forks_count":293,"subscribers_count":194,"default_branch":"master","last_synced_at":"2025-04-07T01:07:55.045Z","etag":null,"topics":["best-practices","conventions","powershell","powershell-community","powershell-practices","style-guide"],"latest_commit_sha":null,"homepage":"https://poshcode.gitbooks.io/powershell-practice-and-style","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PoshCode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2014-03-01T15:02:58.000Z","updated_at":"2025-04-04T16:39:42.000Z","dependencies_parsed_at":"2023-02-17T14:45:54.797Z","dependency_job_id":"46d8e49a-f499-41b9-8b2f-83c41912491c","html_url":"https://github.com/PoshCode/PowerShellPracticeAndStyle","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PoshCode%2FPowerShellPracticeAndStyle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PoshCode%2FPowerShellPracticeAndStyle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PoshCode%2FPowerShellPracticeAndStyle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PoshCode%2FPowerShellPracticeAndStyle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PoshCode","download_url":"https://codeload.github.com/PoshCode/PowerShellPracticeAndStyle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248067949,"owners_count":21042387,"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":["best-practices","conventions","powershell","powershell-community","powershell-practices","style-guide"],"created_at":"2024-08-01T16:02:31.105Z","updated_at":"2025-04-09T16:32:49.381Z","avatar_url":"https://github.com/PoshCode.png","language":null,"readme":"## The PowerShell Best Practices and Style Guide\n\n[Table Of Contents](#table-of-contents)\n\n\u003cp align=\"center\"\u003e\u003ca rel=\"license\" href=\"http://creativecommons.org/licenses/by-sa/4.0/\" style=\"display: inline-block; float: left; vertical-align: middle; margin: 10px;\"\u003e\u003cimg alt=\"Creative Commons License\" style=\"border-width:0\" src=\"https://i.creativecommons.org/l/by-sa/4.0/88x31.png\" /\u003e\u003c/a\u003e\u003c/p\u003e\n\nThis work is licensed under a [Creative Commons Attribution-ShareAlike 4.0 International License](http://creativecommons.org/licenses/by-sa/4.0/), please attribute to Don Jones, Matt Penny, Carlos Perez, Joel Bennett and the PowerShell Community.\n\n###### You are free to:\n\n**Share** — copy and redistribute the material in any medium or format\n\n**Adapt** — remix, transform, and build upon the material\n\nThe authors encourage you to redistribute this content as widely as possible, but require that you give credit to the primary authors below, and that you notify us on GitHub of any improvements you make.\n\n### What are Best Practices\n\n_PowerShell Best Practices_ are what you should usually do as a starting point. They are ways of writing, thinking, and designing which make it _harder_ to get into trouble. The point of a _Best Practice_ is to help the reader to fall into the pit of success:\n\n\u003e **The Pit of Success:** in stark contrast to a summit, a peak, or a journey across a desert to find victory through many trials and surprises, we want our customers to simply fall into winning practices by using our platform and frameworks.  To the extent that we make it easy to get into trouble we fail.\n\n\u003e -- Rico Mariani, MS Research MindSwap Oct 2003.\n\nLike English spelling and grammar rules, PowerShell programming best practices and style rules nearly always have exceptions, but we are documenting a baseline for code structure, command design, programming, formatting, and even style which will help you to avoid common problems, and help you write more reusable, readable code -- because reusable code doesn't have to be rewritten, and readable code can be maintained.\n\nHaving said that, remember: the points in the Best Practices documents and the Style Guide are referred to as _practices_ and _guidelines_, not rules. If you're having trouble getting something done because you're trying to avoid _breaking_ a style or best practice rule, you've misunderstood the point: this document is pragmatic, rather than dogmatic. We'll leave dogmatism to teams and projects that require you to meet their specific guidelines.\n\n### Table of Contents\n\nThe guidelines are divided into these sections:\n\n* [Style Guide (Introduction)](Style-Guide/Introduction.md)\n  * [Code Layout and Formatting](Style-Guide/Code-Layout-and-Formatting.md)\n  * [Function Structure](Style-Guide/Function-Structure.md)\n  * [Documentation and Comments](Style-Guide/Documentation-and-Comments.md)\n  * [Readability](Style-Guide/Readability.md)\n  * [Naming Conventions](Style-Guide/Naming-Conventions.md)\n* [Best Practices (Introduction)](Best-Practices/Introduction.md)\n  * [Naming Conventions](Best-Practices/Naming-Conventions.md)\n  * [Building Reusable Tools](Best-Practices/Building-Reusable-Tools.md)\n  * [Output and Formatting](Best-Practices/Output-and-Formatting.md)\n  * [Error Handling](Best-Practices/Error-Handling.md)\n  * [Performance](Best-Practices/Performance.md)\n  * [Security](Best-Practices/Security.md)\n  * [Language, Interop and .NET](Best-Practices/Language-Interop-and-.NET.md)\n  * [Metadata, Versioning, and Packaging](Best-Practices/Metadata-Versioning-and-Packaging.md)\n\n### Current State:\n\nRemember [what we mean by _Best Practices_](#what-are-best-practices).\n\nThe *PowerShell Best Practices* are always evolving, and continue to be edited and updated as the language and tools (and our community understanding of them) evolve. We encourage you to check back for new editions at least twice a year, by visiting [https://github.com/PoshCode/PowerShellPracticeAndStyle](https://github.com/PoshCode/PowerShellPracticeAndStyle).\n\nThe *PowerShell Style Guide* in particular is in PREVIEW, and we are still actively working out our disagreements about the rules in the guide through the GitHub issues system.\n\n#### Contributing\n\nPlease use the issues system or GitHub pull requests to make corrections, contributions, and other changes to the text - we welcome your contributions!\n\nFor more information, see [CONTRIBUTING](CONTRIBUTING.md).\n\n#### Credits\n\n_The Community Book of PowerShell Practices_ was originally compiled and edited by Don Jones and Matt Penny with input from the Windows PowerShell community on PowerShell.org.\n\nPortions copyright (c) Don Jones, Matt Penny, 2014-2015\n\n_The PowerShell Style Guide_ was originally created by Carlos Perez, for his students, and all the good parts were written by him.\n\nPortions copyright (c) Carlos Perez, 2015\n\nAny mistakes in either of these documents are there because Joel Bennett got involved. Please submit [issues](https://github.com/PoshCode/PowerShellPracticeAndStyle/issues) and help us correct them.\n\nPortions copyright (c) Joel Bennett, 2015\n","funding_links":[],"categories":["Others","miscellaneous","Shell","Development Environment"],"sub_categories":["PowerShell"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPoshCode%2FPowerShellPracticeAndStyle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPoshCode%2FPowerShellPracticeAndStyle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPoshCode%2FPowerShellPracticeAndStyle/lists"}