[string] $successLoginText = "New Message"
That looks like PowerShell code. The monitor I'm using is "HTTP Form Login Monitor" and it doesn't have a script that I can see. The closest thing I can see is a "Login Success Regular Expression" option.
Is there a newer version of this monitor I should be using, or is there a different one I should use?