Reconfigure SMS Client Cache setting
Does anyone know how to set the SMS client cache setting remotely/?
(preferably using WMI?)
(preferably using WMI?)
0 Comments
[ + ] Show comments
Answers (8)
Please log in to answer
Posted by:
Bladerun
18 years ago
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.
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
Posted by:
brenthunter2005
18 years ago
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.
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.
Posted by:
Bladerun
18 years ago
Posted by:
brenthunter2005
18 years ago
Posted by:
Bladerun
18 years ago
Posted by:
brenthunter2005
18 years ago
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
Posted by:
Chuckitall
18 years ago
Posted by:
brenthunter2005
18 years ago
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.
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.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.