How to set SMS agent cache size

For changing SMS 2003 agent cache size via script, here what you need.
Remember to set CacheSize according to your require.

On Error Resume Next
Dim oUIResManager
Dim oCache
Dim CacheSize

CacheSize=512

Set oUIResManager = createobject("UIResource.UIResourceMgr")
If oUIResManager Is Nothing Then
    wscript.echo "Could not create Resource Manager - quitting"
    wscript.quit
End If

Set oCache=oUIResManager.GetCacheInfo()

If oCache Is Nothing Then
    Set oUIResManager=Nothing
    wscript.echo "Could not get cache info - quitting"
    wscript.quit
End If

oCache.TotalSize=CacheSize
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s