<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; VBS: Выполнить команду на удаленном компе и проанализировать результат]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=7888&amp;type=atom" />
	<updated>2012-12-20T12:49:50Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=7888</id>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Выполнить команду на удаленном компе и проанализировать результат]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=67231#p67231" />
			<content type="html"><![CDATA[<p>Чтобы долго не заморачиваться и не курить много мануалов, проще глянь в сторону psexec.exe<br />ИМХО, самый простой ,быстрый&nbsp; и надёжный выход...</p>]]></content>
			<author>
				<name><![CDATA[Евген]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=25253</uri>
			</author>
			<updated>2012-12-20T12:49:50Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=67231#p67231</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[VBS: Выполнить команду на удаленном компе и проанализировать результат]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=67219#p67219" />
			<content type="html"><![CDATA[<p>Доброго Всем времени суток!<br />Есть такая задача, поочередно зайти на полторы сотни компов, на каждом выполнить команду &quot;telnet xxx.xx.xx.xx yyyy&quot; и посмотреть результат, пройдёт подключение или отобьется? Вручную делать, естественно, не хочется. <br />Компы не в домене, поэтому надо указывать логин/пароль для подключения. Предполагаю, что нужно вот так:<br /></p><div class="codebox"><pre><code>Set objLocator = CreateObject  (&quot;WbemScripting.SWbemLocator&quot;)
Set objService = objLocator.ConnectServer (&quot;computer1&quot;, &quot;Root\CIMV2&quot;, &quot;admin&quot;, &quot;тридвараз&quot;)</code></pre></div><p>А вот дальше как-то я теряюсь <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /><br />думал вот так<br /></p><div class="codebox"><pre><code>Set oWbemObj = objService.Get(&quot;Win32_Process&quot;)
oWbemObj.create (&quot;telnet xxx.xx.xx.xx yyyy&quot;)
MsgBox &quot;подключился!&quot;</code></pre></div><p>Но проходит в любом случае, даже когда указываю несуществующий IP</p><p>Может кто что подскажет?<br />Спасибо</p>]]></content>
			<author>
				<name><![CDATA[Домовой]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=28907</uri>
			</author>
			<updated>2012-12-20T09:47:05Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=67219#p67219</id>
		</entry>
</feed>
