That annoying Powershell behavior...
I was working on a Powershell script sometime back when I realized that running a foreach block on a $null in Powershell actually iterates through the code block. Quite counterintuitive...
Make sure to include a check for $null within the foreach block to avoid unexpected exceptions!
Written by Alice
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Powershell
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#