Cleaning the SCCM Cache the right way with PowerShell
Ioan Popovici
206

Hey there — Love the script, I’m no script genius so I need your help. I am trying to run this on a test machine (aka production server←-jk?)

running into an error while testing

( have not modified the script at all, maybe thats my issues)
You must provide a value expression on the right-hand side of the ‘-’ operator.
At C:\admin\Clean-CMClientCache.ps1:306 char:37
+ If ($Program.PackageID — <<<< NotIn $PackageIDDeleteTrue) {
 + CategoryInfo : ParserError: (:) [], ParseException
 + FullyQualifiedErrorId : ExpectedValueExpression

Thoughts?

Thank you!