<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; VBS & WMI: Просмотр Списка Груп Администраторы на удалённом компьютре]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=6000&amp;type=atom" />
	<updated>2011-07-15T13:05:22Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=6000</id>
		<entry>
			<title type="html"><![CDATA[Re: VBS & WMI: Просмотр Списка Груп Администраторы на удалённом компьютре]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=49886#p49886" />
			<content type="html"><![CDATA[<p>1. Выражайте, пожалуйста, свои мысли яснее.<br />1.1. Пишите грамотно.<br />1.2. Поясните фразу &quot;просто что б шло по ветке&quot;.<br />2. Вам была предложена лишь отправная точка (то есть заготовка), а не &quot;заточенная&quot; под Ваши условия реализация.<br />Речь-то в первом сообщении Вы вели о помощи, а не о предоставлении готового решения.<br />3. Если не знаете, как получить список всех станций домена, то вот пример кода, который формирует массив NetBIOS-имён станций, работающих под управлением ОС Windows не серверного типа.<br /></p><div class="codebox"><pre><code>Dim objRoot, strDomain, arrTemp(), i
Dim objConnection, objCommand, objRSet, strCommandText
Const ADS_SCOPE_SUBTREE = 2
Const ADS_UF_ACCOUNTDISABLE = 2

Set objRoot = GetObject(&quot;LDAP://RootDSE&quot;)
strDomain = objRoot.Get(&quot;DefaultNamingContext&quot;)
Set objRoot = Nothing
Set objConnection = CreateObject(&quot;ADODB.Connection&quot;)
objConnection.Provider = &quot;ADsDSOObject&quot;
objConnection.Open &quot;Active Directory Provider&quot;
Set objCommand = CreateObject(&quot;ADODB.Command&quot;)
Set objCommand.ActiveConnection = objConnection
strCommandText = &quot;SELECT cn,userAccountControl,operatingSystem FROM &#039;LDAP://&quot; &amp; strDomain &amp; &quot;&#039; WHERE objectCategory=&#039;Computer&#039;&quot;
objCommand.CommandText = strCommandText
objCommand.Properties(&quot;Page Size&quot;) = 3000
objCommand.Properties(&quot;Timeout&quot;) = 30
objCommand.Properties(&quot;Sort On&quot;) = &quot;cn&quot;
objCommand.Properties(&quot;Searchscope&quot;) = ADS_SCOPE_SUBTREE
Set objRSet = objCommand.Execute
objRSet.MoveFirst
i = 0
Do
    If Not (objRSet.Fields(&quot;userAccountControl&quot;).Value And ADS_UF_ACCOUNTDISABLE) Then
        strTemp = objRSet.Fields(&quot;operatingSystem&quot;).Value
        If Not IsNull(strTemp) Then
            If InStr(1, strTemp, &quot;windows&quot;, vbTextCompare) &gt; 0 And _
                InStr(1, strTemp, &quot;server&quot;, vbTextCompare) = 0 Then
                ReDim Preserve arrTemp(i)
                arrTemp(i) = objRSet.Fields(&quot;cn&quot;).Value
                i = i + 1
            End If
        End If
    End If
    objRSet.MoveNext
Loop While Not objRSet.EOF
Set objRSet = Nothing
Set objCommand = Nothing
objConnection.Close
Set objConnection = Nothing</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Dmitrii]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=13351</uri>
			</author>
			<updated>2011-07-15T13:05:22Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=49886#p49886</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS & WMI: Просмотр Списка Груп Администраторы на удалённом компьютре]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=49881#p49881" />
			<content type="html"><![CDATA[<p>Спасибо конечно, за ответ, но меня интересует именно не от что бы я вбивал, а просто что б шло по ветке.. там около 2000 компов! Я физически не смогу их туда впихнуть!</p>]]></content>
			<author>
				<name><![CDATA[afteroot]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=25967</uri>
			</author>
			<updated>2011-07-15T12:05:28Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=49881#p49881</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS & WMI: Просмотр Списка Груп Администраторы на удалённом компьютре]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=49877#p49877" />
			<content type="html"><![CDATA[<p>Тема <a href="http://forum.script-coding.com/viewtopic.php?pid=49876#p49876">VBS &amp; ADSI: Контроль группы локальных админ-ов на станциях домена</a> дополнена кодом функции, способной как очищать, так и расширять список членов группы локальных администраторов.</p>]]></content>
			<author>
				<name><![CDATA[Dmitrii]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=13351</uri>
			</author>
			<updated>2011-07-15T10:32:44Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=49877#p49877</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS & WMI: Просмотр Списка Груп Администраторы на удалённом компьютре]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=49832#p49832" />
			<content type="html"><![CDATA[<p>В качестве отправной точки можно использовать сценарий, представленный здесь:<br /><a href="http://forum.script-coding.com/viewtopic.php?id=6002">VBS &amp; ADSI: Контроль группы локальных админ-ов на станциях домена</a></p>]]></content>
			<author>
				<name><![CDATA[Dmitrii]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=13351</uri>
			</author>
			<updated>2011-07-13T12:04:00Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=49832#p49832</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS & WMI: Просмотр Списка Груп Администраторы на удалённом компьютре]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=49829#p49829" />
			<content type="html"><![CDATA[<p>Исправьте ошибки грамматические.</p>]]></content>
			<author>
				<name><![CDATA[JSmаn]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24434</uri>
			</author>
			<updated>2011-07-13T10:40:38Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=49829#p49829</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[VBS & WMI: Просмотр Списка Груп Администраторы на удалённом компьютре]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=49828#p49828" />
			<content type="html"><![CDATA[<p>Ребята помогите плиз реализовать!<br />Хочу прочитать сабж (Локальных Администраторов). В идеале если кто знает что б и можно было добавлять так же удалённо!<br />Заранее спасибо!</p>]]></content>
			<author>
				<name><![CDATA[afteroot]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=25967</uri>
			</author>
			<updated>2011-07-13T10:17:54Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=49828#p49828</id>
		</entry>
</feed>
