Could it be the exception that you can't seem to catch? As far as I know we should be able to pass incorrect parameter like that and mIRC should handle it, this is assuming objects are never themselves crashing.

Thanks for looking this up. Yes, incorrect parameters are caught by Invoke, however this particular issue results in heap corruption in the COM object, at which point the application is forcibly closed. It sounds very much like the issue described in the PowerShell bug report.