{"repo":"nightroman/PowerShellTraps","free":true,"listed":false,"github":"https://github.com/nightroman/PowerShellTraps","clone":"git clone https://github.com/nightroman/PowerShellTraps.git","description":"Collection of PowerShell traps and oddities","language":"PowerShell","stars":466,"topics":["powershell","testing","issues"],"license":"Apache-2.0","category":"dev-tools","readme_excerpt":"[TESTS]: ./TESTS.md [Invoke-PowerShell.ps1]: https://www.powershellgallery.com/packages/Invoke-PowerShell PowerShellTraps is a collection of some PowerShell traps and oddities shown by demo scripts, workarounds, and automated tests. On invoking scripts change to their directory. See also [TESTS]. Some scripts require [Invoke-PowerShell.ps1]. --- Index - Basic - Class - Clixml - Cmdlets - Module - PowerShell.exe Basic - Operators -and and -or have the same precedence - Invoking native apps with error output - Automatic variables as parameters or local variables - Break and Continue with not matching label - Break and Continue without loop - Collection as Boolean - Collection property enumeration - Comparison operators work differently with scalars and collections - Compound assignment operators - Count-and-Length - Mixed objects - PSCustomObject does not have surrogate Count and Length - Count and Length of a scalar fail in the strict mode - Dictionary Count, Keys, Values may misbehave - Different kinds of null - Double quoted strings and sub-expressions with double quotes - DynamicParam - Dynamic switch parameter - $MyInvocation.ExpectingInput is false in DynamicParam - Enums evaluated to true - [Enums without [Flags] attribute](Basic/Enums-without-FlagsAttribute) - Errors of unusual type - FormatEnumerationLimit - Function invoked like method - Invocation with odd paths - LastExitCode - Local action preference variables - Magic method Where - Misleading error location - Miss","default_branch":null,"files":null,"tree":[],"storefront":"/r/nightroman","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/nightroman/PowerShellTraps/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}