Powershell .IndexOf returns -1 on value read from file with Get-Contents
I was evaluating what I thought was a string read from a file, then doing an .indexOf on that string. Took me over an hour to debug something so simple. Trying to get the position of a string within a larger string is pretty basic stuff; yet I was getting the mystery result of -1. […]