#155992 - 2006-01-2605:42 AMRe: Problems with calling array elements in strings...
NTDOCNTDOC Administrator
Registered: 2000-07-28
Posts: 11634
Loc: CA
Well I would never have thought of it, but Les was spot on with his diagnosis. It would appear that one or more of the computers in your list either had a leading space or a trailing space. I added some trailing spaces to my list of computers and got the same error you did. By adding the code below it then ran correctly again.
Thanks Les
By adding this, it removes any of those spaces in the file (though it's better if you didn't have spaces in the first place) $sComputer = Trim($sComputer)
Try this code out now and hopefully it should work correctly on your whole list. Then you can start working on logging it.