#155998 - 2006-01-2701:41 AMRe: Problems with calling array elements in strings...
NTDOCNTDOC Administrator
Registered: 2000-07-28
Posts: 11634
Loc: CA
Okay I found the error. I coded it incorrectly for the WMI check in the main script. I was doing an If $WMIOkay then assumed WMI was okay and moved on. What can happen is that you can get an error and it would then return and fill that var with the error code which in affect would say that everything was okay and then move on to the next section of the script where it would then get another error trying to query the remote system and perform an abnormal end to the script.
I've modified the code now to check for a specific version and if found continue. If the version is older or an error occurs then it should report that and still keep going with the other computers in the list. I've also modified it to use UPPERCASE names for the computers.
I also updated the GetBIOSInfo UDF so that it would cleanly exit if there was an error as well and not cause the script to abonormally end.
Give this a try and let us know how it works out please.