PowerShellPracticeAndStyle
PowerShellPracticeAndStyle copied to clipboard
The Unofficial PowerShell Best Practices and Style Guide
https://github.com/PoshCode/PowerShellPracticeAndStyle/blob/master/Style-Guide/Naming-Conventions.md Idiomatic powershell should be encouraged, and the only substantive reason for discouraging a particular alias is compatability issue across versions. (PSCore/Standard). Summary: use aliases everywhere and encourage people to...
Is there a best practice way of handling file path formatting? These are the ways I know how to format them right now, assuming a path of '\\Server1\Share1\SubFolder1\File1.txt' ``` $Server...
Hey, anyone interested in trading success stories about how you "build" modules? I just tried something new this week on the [SecretServer](https://github.com/RamblingCookieMonster/SecretServer) module, thanks to @bushe and @ramblingcookiemonster ... where...
https://github.com/PoshCode/PowerShellPracticeAndStyle/blob/master/Best%20Practices/err-05-avoid-testing-for-a-null-variable-as-an-error-condition.md First of all, let's not have a misleading discussion. The original guideline uses a bad example. Get-ADUser throws an exception when you use the -Identity parameter and it can't...
> There are going to be a few new things which we need to keep in mind to make our scripts work across multiple platforms. Windows, Nano, Linux, FreeBSD and...
Would it be worth including bits on organizing files and general structure for modules? For example: - Do functions get their own files? If so, how to name these files?...
Hi guys, I recently discovered the possibility to bind a parameter by a custom type name. The common approach seems to be using `[PSCustomObject]` as parameter type if you don't...
Strict Mode
What's the community's view on Strict Mode? Is there one? Should there be one?
For example: https://github.com/pester/Pester This could lead into patterns of structuring modules or a profile folder.
Hi, As I am trying to read the guide 'page by page', I find it a little bit irritating, that even though there is a Table of Contents, I have...