Ask anyone who have worked with PowerShell for a while, and they will all tell you to try to avoid spaces and special characters in variable names and property names of custom objects or hash tables. Even though it’s possible to use them, there is a reason why it’s not recommended, but unfortunately you might come up in a situation where such things are out of your control, and you just have to deal with it.
In this quick tip I will show you how to handle variable names and property names with spaces and special characters.
(more…)