<?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=5588&amp;type=atom" />
	<updated>2011-03-14T13:40:39Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=5588</id>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Установить параметры виртуальной памяти на удаленной машине]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=46152#p46152" />
			<content type="html"><![CDATA[<p><strong>ybill</strong>, пробуйте:<br /></p><div class="codebox"><pre><code>Option Explicit

Dim strComputer

Dim objSWbemLocator
Dim objSWbemServicesEx
Dim objSWbemObjectEx


strComputer = &quot;.&quot;

Set objSWbemLocator    = WScript.CreateObject(&quot;WbemScripting.SWbemLocator&quot;)
Set objSWbemServicesEx = objSWbemLocator.ConnectServer(strComputer, &quot;root\cimv2&quot;)

objSWbemServicesEx.Security_.Privileges.AddAsString &quot;SeCreatePagefilePrivilege&quot;, True

For Each objSWbemObjectEx In objSWbemServicesEx.InstancesOf(&quot;Win32_ComputerSystem&quot;)
    With objSWbemObjectEx
        .AutomaticManagedPagefile = False
        .Put_
    End With
Next


For Each objSWbemObjectEx In objSWbemServicesEx.InstancesOf(&quot;Win32_PageFileSetting&quot;)
    objSWbemObjectEx.Delete_
Next

With objSWbemServicesEx.Get(&quot;Win32_PageFileSetting&quot;).SpawnInstance_
    .Name = &quot;C:\\pagefile.sys&quot;
    .InitialSize = 4096
    .MaximumSize = 4096
    
    .Put_
End With

Set objSWbemObjectEx   = Nothing
Set objSWbemServicesEx = Nothing
Set objSWbemLocator    = Nothing

WScript.Quit 0</code></pre></div>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2011-03-14T13:40:39Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=46152#p46152</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[VBS: Установить параметры виртуальной памяти на удаленной машине]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=46147#p46147" />
			<content type="html"><![CDATA[<p>Привет!</p><p>Есть группа серверов win 2008R2 в домене, на которых у меня есть права администратора. На них требуется установить одинаковые параметры виртуальной памяти, к примеру мин=4096, макс=4096, файл на диске С. Соответственно если там были указаны еще какие-нибудь другие диски, то их обнулить.<br />Хочется делать это скриптом, желательно VBS.</p><p>Поможите кто чем может!</p>]]></content>
			<author>
				<name><![CDATA[ybill]]></name>
			</author>
			<updated>2011-03-14T10:02:32Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=46147#p46147</id>
		</entry>
</feed>
