<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; VBS: Установить параметры виртуальной памяти на удаленной машине]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=5588</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=5588&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «VBS: Установить параметры виртуальной памяти на удаленной машине».]]></description>
		<lastBuildDate>Mon, 14 Mar 2011 13:40:39 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: VBS: Установить параметры виртуальной памяти на удаленной машине]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=46152#p46152</link>
			<description><![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>]]></description>
			<author><![CDATA[null@example.com (alexii)]]></author>
			<pubDate>Mon, 14 Mar 2011 13:40:39 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=46152#p46152</guid>
		</item>
		<item>
			<title><![CDATA[VBS: Установить параметры виртуальной памяти на удаленной машине]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=46147#p46147</link>
			<description><![CDATA[<p>Привет!</p><p>Есть группа серверов win 2008R2 в домене, на которых у меня есть права администратора. На них требуется установить одинаковые параметры виртуальной памяти, к примеру мин=4096, макс=4096, файл на диске С. Соответственно если там были указаны еще какие-нибудь другие диски, то их обнулить.<br />Хочется делать это скриптом, желательно VBS.</p><p>Поможите кто чем может!</p>]]></description>
			<author><![CDATA[null@example.com (ybill)]]></author>
			<pubDate>Mon, 14 Mar 2011 10:02:32 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=46147#p46147</guid>
		</item>
	</channel>
</rss>
