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
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