skissinger
Posts: 2114
Score: 134 Joined: 9/13/2001 From: Sherry Kissinger Status: offline
|
There's a section in the SDK with this script. I haven't tested it, but looks like it has the elements within it for changing the location. quote:
Example The following example method sets the Configuration Manager client cache location with the supplied path and then displays the cache properties. For information about calling the sample code, see How to Call Configuration Manager COM Automation Objects. Visual Basic Script Sub SetCacheLocation(path) On Error Resume Next Dim oUIResManager Dim oCache Dim oCacheElements Set oUIResManager = createobject("UIResource.UIResourceMgr") If oUIResManager Is Nothing Then wscript.echo "Couldn't create Resource Manager - quitting" Exit Sub End If Set oCache=oUIResManager.GetCacheInfo() If oCache Is Nothing Then Set oUIResManager=Nothing WScript.Echo "Couldn't get cache info - quitting" Exit Sub End If oCache.Location = path WScript.Echo "Cache information " & oCache.Location WScript.Echo "Location: " & oCache.Location Wscript.Echo "Total size: " & oCache.TotalSize & " MB" WScript.Echo "Free size: " & oCache.FreeSize & " MB" WScript.Echo "Reserved: " & oCache.ReservedSize & " MB" 'WScript.Echo "Max Duration: " & oCache.MaxCacheDuration & " minutes" ' Wscript.Echo "TombStone Duration: " & oCache.TombStone.Duration & " minutes" Set oCacheElements=oCache.GetCacheElements WScript.Echo "There are " & oCacheElements.Count & " cache elements" WScript.Echo For Each oCacheElement In oCacheElements WScript.Echo "Program Name: " & oCacheElement.CacheElementID Next Set oUIResManager=Nothing Set oCache=Nothing End Sub And, here's a clearcache script: http://www.myitforum.com/articles/8/view.asp?id=7798
_____________________________
mofmaster@smsexpert.com (version 2007) | http://www.smsexpert.com | http://www.sccmexpert.com My Blog Microsoft MVP - ConfigMgr
|