r/PowerShell • • Dec 07 '19

PowerShell Traps - Collection of PowerShell traps and oddities

https://github.com/nightroman/PowerShellTraps
118 Upvotes

8 comments sorted by

View all comments

3

u/Reverent Dec 08 '19

I didn't see anything about different behavior when an array is a size of one.

If you ingest a CSV with a single element and try to iterate it, bad things happen. This even propogates to Microsoft. Their bulk CSV import for azure ad fails if there's only one element.