Does anyone know how to set the SMS client cache setting remotely/?

(preferably using WMI?)
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
Having the same issue. I found this a while back & plan on giving it a try in the next few weeks:

Change the nValueToSet = 500 line to your desired cache size.

On Error Resume Next

Dim nValueToCheck
Dim nValueToSet

Dim oUIResource
Dim oCache

Set oUIResource = CreateObject("UIResource.UIResourceMgr")
Set objCacheInfo = oUIResource.GetCacheInfo

nValueToCheck = 250
nValueToSet = 500

' Set the cache size if it's less than or equal to 250
if objCacheInfo.TotalSize <= nValueToCheck then
objCacheInfo.TotalSize = nValueToSet
end if
Answered 02/28/2006 by: Bladerun
Green Belt

Please log in to comment
0
Hey Bladerun,

This is almost the same script I've seen as well, but the trick is I need to run this remotely.

More importantly I want to run it from the SMS console. And this is why the script must be able to connect to the SMS client remotely and then change the cache size.

I've looked through the SMS SDK, and I don't think a method actually exists. This will be rolled out to the client by way of a SMS program etc.
Answered 02/28/2006 by: brenthunter2005
Fifth Degree Brown Belt

Please log in to comment
0
Out of curiousity, why can't you just sent the script out to the clients along with a program to execute it?
Answered 02/28/2006 by: Bladerun
Green Belt

Please log in to comment
0
Thats what I've decided to do (as I said in my last post).

Its a real pain really. You would think that this setting could be controlled via WMI, and hence be remotely controlled.

Oh well.....
Answered 02/28/2006 by: brenthunter2005
Fifth Degree Brown Belt

Please log in to comment
0
Ah, I misred.

Could you post an update when you do roll this out with your results? It's going to be a critical issue for me to increase the cache size as well for our remote users coming in across the VPN.

Much appreciated.
Answered 02/28/2006 by: Bladerun
Green Belt

Please log in to comment
0
At the moment (until I find out if its possible to do this remotely) this is the script we will be using as part of a SMS program. It logs to the Application Event Log.:


intMinValueToSet = 2000 '=2GB (2000MB)

'If the script cannot set the value (as configured above) because there isn't enough free space, then
'the script will use two thirds of the available space

'''''''''''''

On Error Resume Next
Set objShell = CreateObject("WScript.Shell")
Set oUIResource = CreateObject("UIResource.UIResourceMgr")
Set objCacheInfo = oUIResource.GetCacheInfo

'wscript.echo objCacheInfo.TotalSize
objShell.LogEvent 4, "Current size of SMS client cache: " & objCacheInfo.TotalSize

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objCDrive = objFSO.GetDrive(objFSO.GetDriveName("C:\"))
intFreeSpace = CInt(objCDrive.FreeSpace/1024/1024) '=MBs

'wscript.echo "intFreeSpace=" & intFreeSpace
objShell.LogEvent 4, "Current free space on SMS client: " & intFreeSpace

If intFreeSpace > intMinValueToSet Then
intValueToSet = CInt(intMinValueToSet)
Else
intValueToSet = CInt(intFreeSpace / 1.33)
End If

objCacheInfo.TotalSize = intValueToSet
'wscript.echo "Setting new size of: " & intValueToSet
objShell.LogEvent 4, "Setting new SMS client cache size of: " & intValueToSet
Answered 02/28/2006 by: brenthunter2005
Fifth Degree Brown Belt

Please log in to comment
0
Use SMS tools, right click on the collection. right click on SMS Tools, click on Change Cache size. In the box that comes up enter the new cache size in MB.
Answered 03/17/2006 by: Chuckitall
Yellow Belt

Please log in to comment
0
Hello Chuckitall,

Your post assumes that additional 3rd party SMSTools packages have been installed into the SMS Console.

I finally found the one that you probably have installed and the way it works is to copy the script to the admin$ share and then execute that script remotely.

I was hopeing there would be a way that didn't involve copying the script to the remote computer. This is mainly because of the user context (rather than admin context needed to access the admin$ share) I use to run the SMS console.

From what I have read it is not possible to change the client cache size remotely using WMI. One day I will look into the Systems.Management & SMS .NET classes.
Answered 03/19/2006 by: brenthunter2005
Fifth Degree Brown Belt

Please log in to comment
Answer this question or Comment on this question for clarity