Jump to content
EduGeek EdSec 2026 is Go! 27th Oct in Derby! Join us for a day of EdTech security focused talks, networking, and an evening social ×

Recommended Posts

Posted

Hi,

 

I'm trying to set our Cache size to 10240 by default when the SCCM client gets pushed to newly imaged computers but not having any luck.... how are you guys doing it?

 

Attached a screenshot of where I'm applying the setting, although I do remember seeing it set elsewhere on some other site.

 

Thanks

 

Ben

ExampleOne.jpg

Posted

Ours is SMSCACHESIZE=10240 - So yours looks right. However shouldn't the package be "Configuration Manager Client Package" Not the update package you have?

 

- - - Updated - - -

 

You can use this script to change the size on existing machines as well if you wanted. Just deploy it as a package.

 

Set WSHShell = CreateObject("WScript.Shell")
Set wshNetwork = WScript.CreateObject( "WScript.Network" )
strComputer = wshNetwork.ComputerName
intCacheSize = 10240
Set objWMIService = GetObject("winmgmts://" & strComputer & "/root/ccm/SoftMgmtAgent")
Set colItems = objWMIService.ExecQuery("Select * from CacheConfig")
For Each objItem in colItems
 objItem.Size = intCacheSize
 objItem.Put_ 0
 WshShell.Logevent 4, "The SCCM cache size on " & UCase(strComputer) & " located at " & objItem.Location & " will be changed to: " & objItem.Size & " MB"
Next
 
Dim objService, colListOfServices

intSleep = 15000
strService = " 'CCMExec' "
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colListOfServices = objWMIService.ExecQuery ("Select * from Win32_Service Where Name ="& strService & " ")
For Each objService in colListOfServices
'strServiceList = strServiceList & vbCr & objService.name
objService.StopService()
WSCript.Sleep intSleep
objService.StartService()
Next
'WScript.Echo strServiceList
WshShell.Logevent 4, "Your "& strService & " service has Started"
WshShell.Logevent 4, "The SCCM cache size on " & UCase(strComputer) & " has been changed to: " & intCacheSize & " MB"
WScript.Quit

Posted

Thanks for the reply... I created the package when we upgraded from SP1 to R2 which I guess is why its named update. It all works apart from setting the cache size but we've never been able to set it.

 

What do you have in your client push settings?

 

Attached a screenshot of ours.... I've also added in SMSCACHESIZE=10240 but not sure of the correct format.

 

SMSSITECODE=RHS,SMSCACHESIZE=10240

 

or

 

SMSSITECODE=RHS SMSCACHESIZE=10240

ExampleTwo.jpg

Posted

Why not use the default package?

 

For client push my settings are:

SMSSITECODE=FAL FSP=FP-SCCM-01 SMSCACHESIZE=26214400

 

For SCCM TS:

FSP=FP-SCCM-01 SMSCACHESIZE=26214400

 

 

We don't use client push though as everything added to the domain is via a TS.

Posted
Ok, Thanks I'll try those settings in our client push. I didn't use the default package IIRC because it was using the older SP1 client and not the updated R2 version.
Posted

Assuming your asking me then yes :) new value applied. Tried the odd random machine to test.

 

I needed to do it for a program - Adobe CS6 I think and that then installed without issue.

  • Thanks 1
Posted
Assuming your asking me then yes :) new value applied. Tried the odd random machine to test.

 

I was specifically asking about client push settings but I guess a script will do the samething.

 

I needed to do it for a program - Adobe CS6 I think and that then installed without issue.

 

That's exactly what I'm doing it for now.... DAMN Adobe's crappy software.

Posted
By using the script? Yes

 

What about not using the script method and setting the properties in the client push or task sequence?

Posted (edited)
how are you guys doing it?

A PowerShell script in the task sequence we use to build each PC.

 

$Cache = Get-WmiObject -Namespace 'ROOT\CCM\SoftMgmtAgent' -Class CacheConfig
$Cache.Size = '10240'
$Cache.Put()
Restart-Service -Name CcmExec

 

This one-liner should also work, although I haven't tested it myself.

 

C:\Windows\System32\WindowsPowershell\v1.0\powershell.exe -Command "(New-Object -COM UIResource.UIResourceMgr).GetCacheInfo().TotalSize = 10240"

Edited by Arthur
  • Thanks 1
Posted
What about not using the script method and setting the properties in the client push or task sequence?

 

Sorry im with it. Yes that works for me, only use the TS option.

  • Thanks 1
Posted (edited)

Yay... its working.

 

Not sure which one made it work (client push or task sequence) as I have both enabled but its working.

 

Thanks for everyones help :)

 

EDIT

 

Just as a point of reference it was the client push properties that did it for me... attached screenshot.

ClientPush.jpg

Edited by jaminben

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...