Follow this series! PowerShell is new to me ... have watched many and tried to absorb ( it has to be said ... not very successfully) but your tutorials are some of the best! Both in style and content. I have re-watched each of them and working along with them ... excellent! Highly recommended! - 76 year old of dubious intellectual stature.
It's funny how this youtuber has only 30 subs and explain better than majority! While some pathetics others puts advertising + merchandise + etc. Teaches you nothing!! Keep this channel growing! Never give up!
Niklas - problemet $csv | ForEach-Object { $pop[$_.Name] = $_.CENSUS2010POP} produces an error in PowerShell 7.3.4:- InvalidOperation: Line | 2 | $pop[$_.Name] = $_.CENSUS2010POP | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | Cannot index into a null array. It works correctly in PowerShell 5.1 ...... Thanks for this excellent PowerShell series
Eight months late, but I finally realized what caused this. You need to initialize $pop to an empty hashtable before executing the above statement. Otherwise the expression $pop[$_.Name] will fail because $pop is null.
Follow this series! PowerShell is new to me ... have watched many and tried to absorb ( it has to be said ... not very successfully) but your tutorials are some of the best! Both in style and content. I have re-watched each of them and working along with them ... excellent! Highly recommended! - 76 year old of dubious intellectual stature.
One of the best PS tutorials I've seen. Thanks!
It's funny how this youtuber has only 30 subs and explain better than majority!
While some pathetics others puts advertising + merchandise + etc. Teaches you nothing!!
Keep this channel growing! Never give up!
This explanation was fantastic🔥. Thank you. I’ll be watching your other powershell videos to grasp working with it.
Thank you for the video
Niklas - problemet
$csv | ForEach-Object { $pop[$_.Name] = $_.CENSUS2010POP}
produces an error in PowerShell 7.3.4:-
InvalidOperation:
Line |
2 | $pop[$_.Name] = $_.CENSUS2010POP
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Cannot index into a null array.
It works correctly in PowerShell 5.1 ...... Thanks for this excellent PowerShell series
That's funny, I tested this using PowerShell 7.something. I hope the video is still useful to you even with that error!
Eight months late, but I finally realized what caused this. You need to initialize $pop to an empty hashtable before executing the above statement. Otherwise the expression $pop[$_.Name] will fail because $pop is null.