Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help Pretty Please

Status
Not open for further replies.

ruxtonp

Technical User
Jan 11, 2005
1
GB
Afternoon,

I'm wondering if someone can help as I'm really new to VB Scripting....

I'm trying to create a VBscript which checks the System Page file on remote machines and then sets it to the below.... Basically I want to be able to connect to lots of remote machines then for the script to check the page file and if it's not set to 4096 then change it....



If it is W2K3 Standard then set it to 4096 (Max Allowed)
All other servers check the memory size - times it by 2.5 and then set it.
I have the below script at the moment but need help with the checking the machine first

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colPageFiles = objWMIService.ExecQuery _ ("Select * from Win32_PageFileSetting")
For Each objPageFile in colPageFiles
objPageFile.InitialSize = 3000
objPageFile.MaximumSize = 3000
objPageFile.Put_
Next


Many Thanks

Pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top