Anyone have any good ideas on executing commands like that though something other than telnet or psexec?
SSH perhaps?
If you meant something else, I don't see how you can avoid using a Client<->Server system in order to remotely execute a command...
but psexec seems to throw my script off, as it has all of its annoying headers and what not
(Assuming your script is running on a windows machine, and that you have decoded the UTF16 output as others above have advised) If you parse the remote command's output line by line and look for the string \r\s you should be able to safely ignore that line and assume it is one of those pesky headers that psexec creates...
1. It won't remove the Copyright stuff, though that should be easy to skip/ignore...
2. It shouldn't remove any real warnings or errors generated by your remote command (OWSADM.exe). But, test it for yourself, don't rely on my word for it...
| [reply] [d/l] |