Friday, October 9, 2009

Change cache location

Sometimes you have a cache folder needs to move because of space issues

To do this at install time you need to use the SMSCACHEDIR attribute:
CCMSetup.exe SMSCACHEDIR="D:\sccm\cache"
Will force the client to install the cache folder to the D drive in a new folder

Maybe the client is already installed but you want to change the folder. Here is a VbScript that you can push down to the client. This takes a fraction of a second to run on the client so they are not affected by the change. Be aware that Cache cannot have any advertisment that is active. If so then you can't move the cache.

Dim oUIResourceMgr
Dim oCache
Set oUIResourceMgr = CreateObject("UIResource.UIResourceMgr")
Set oCacheInfo = oUIResourceMgr.GetCacheInfo
oCacheInfo.Location = "D:SCCM\Cache"