Giter VIP home page Giter VIP logo

Comments (9)

Ioan-Popovici avatar Ioan-Popovici commented on May 27, 2024

Hi @zebox1,

Sorry for the delay in handling this issue. Can you please post the full command you ran to clean the cache?
Also please use the -Debug and -Verbse switches and attach the log file.

Thank you
Ioan

from sccm-zone.com.

nlvw avatar nlvw commented on May 27, 2024

Testing v4.0 of the script I am hitting a similar issue.

Clean-CMClientCache.ps1 -CleanupActions ALL -LoggingOptions Host,File -Verbose

Log:

[Main:CleanupResult] ::

FullName : NAPS2
Name : NAPS2 - 6.1.1
Location : C:\WINDOWS\ccmcache\1u
LastReferenceTime : 7/19/2019 8:25:39 PM
Size(MB) :
Status : AboveReferencedThreshold

TotalDeletedSize: 0 1/1/1601 12:00:00 AM 0 (0x0000)

The cache item above was not deleted and it did not show the cache items for "Uninstall Content". In this run there should have been 4 other cache entries.

What I noticed is that if an applications Uninstall Content is set to be the same as the Install Content (Specific Setting in Application Deployment Type) then the script finds it. If the App Deploy Type is set to have different uninstall content then install content the the script doesn't show it or delete it.

Either way cache items are not being cleaned up.

from sccm-zone.com.

Ioan-Popovici avatar Ioan-Popovici commented on May 27, 2024

I’ll have a look. Can you also include the -Debug switch?

Sent with GitHawk

from sccm-zone.com.

nlvw avatar nlvw commented on May 27, 2024

So I ran the command again but with the debug flag and here was the results.

[Main:CleanupResult] ::

FullName : Blender
Name : Blender - 2.79.2 (64-bit)
Location : C:\WINDOWS\ccmcache\20
LastReferenceTime : 7/19/2019 10:42:52 PM
Size(MB) :
Status : Removed

FullName : 7-Zip File Archiver
Name : 7zip - 18.06 (64/32-bit)
Location : C:\WINDOWS\ccmcache\1y
LastReferenceTime : 7/19/2019 10:51:14 PM
Size(MB) :
Status : Removed

FullName : NAPS2
Name : NAPS2 - 6.1.1
Location : C:\WINDOWS\ccmcache\1z
LastReferenceTime : 7/19/2019 10:41:49 PM
Size(MB) :
Status : Removed

FullName : G*Power
Name : GPower - 3.1.94
Location : C:\WINDOWS\ccmcache\21
LastReferenceTime : 7/19/2019 10:42:55 PM
Size(MB) :
Status : Removed

TotalDeletedSize: 0 1/1/1601 12:00:00 AM 0 (0x0000)

This time it correctly found and removed all the cache items. I'll link the log file since it contains the runs that did not find the other cache items or remove the one item it did find. The only thing that changed on the current run is that a few days have passed between runs.
Clean-CMClientCache.log

from sccm-zone.com.

Ioan-Popovici avatar Ioan-Popovici commented on May 27, 2024

If you look at the ‘failed’ cleanup it says
‘AboveReferencedThreshold’. Did you specify the ReferencedThreshold manually?
Because if you did it works as designed.
The cache will only be deleted if it was not Referenced that the specific number of days you specify at runtime.

Sent with GitHawk

from sccm-zone.com.

nlvw avatar nlvw commented on May 27, 2024

I was leaving the Reference flag not defined since the default is documented as "0". I tried manually specifying zero with the same result.

It feels like the 0 setting only deletes cache items that are 1 day old since last reference.

Basically as long as the the cache item is not part of a pending, active, or scheduled deployment I want it to delete. I don't care about last reference time or retention beyond that.

Do I need to specify a different flag for this?

from sccm-zone.com.

nlvw avatar nlvw commented on May 27, 2024

I located my ReferenceThreshold issue. For whatever reason my Last Reference Time is being set 6 hours ahead of the actual time it was last referenced. That seems like a client configuration issue i'll need to track down and not so much a problem with the script (Unless this 6 hour offset is not a configuration issue and is standard practice by the client).

from sccm-zone.com.

Ioan-Popovici avatar Ioan-Popovici commented on May 27, 2024

Hmm... shouldn’t. Maybe it’s stored in UTC?
I haven’t had time to look at the code yet but you could try with setting the Reference flag to -1. I don’t remember exactly what I did but it should work.

Sent with GitHawk

from sccm-zone.com.

Ioan-Popovici avatar Ioan-Popovici commented on May 27, 2024

These two fixes should cover the issue. Feel free to reopen this issue if any more cleanup problems pop up.
Thanks again @Wolfereign for the fixes.

Sent with GitHawk

from sccm-zone.com.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.