I have two near-identical Powershell scripts.
The only difference between the two is 2 places where uu-lillebaelt has been changed to uuoresund. When I run the script with -like 'uuoresund', I get a bunch of errors saying: You cannot call a method on a null-valued expression And this is happening when calling:
$size.IndexOf
$size.Substring
I have made sure, that size is not actually null, so that is not the problem. I feel that it must be something about the -like operator I do not understand.