clean-up job - not quite sure what settings to use in SCCM.

Topics: Archive - General
Dec 20, 2013 at 10:08 PM
Hi

I've created a little package to delete some shortcuts using the psApp script...

I've created a collection that looks for specific .lnk files and anyone member of that group will have the package run..
But I want to make sure that it's run EVERY time a device reports back that the file exists.. not just the first time..
Is there any settings in the package that I need to make sure is set?
Coordinator
Dec 25, 2013 at 1:40 PM
I would suggest either:

A. Create an SCCM application (if you're using SCCM 2012) with a script detection method to check if the shortcut(s) exist.
B. Create a configuration item with detection and remediation scripts.

Either of these approaches will make sure the shortcuts are deleted whenever they are detected.
Dec 25, 2013 at 4:04 PM
Hi Powersheller

thank you for the reply.

What I decided to do is this:

a. activate fille indexing in sccm, and specify the specific file extensions I want sccm to index from each client.
b. create a query that looks for a specific folder/.lnk file.
c. create a package that runs the psappdeploy script using "remove-file -path "C:\blablabla" -recourse and set this to 'always run'

That way any client that has the .lnk file will be added to my "does this file exist" collection even it they've had the package run once before.

So if I install.... oh say Java.. and later update it.. and thus creating the 'all programs' Java folder again.. it will be deleted when the client reports it to sccm.

let me know if this is 'bad' in any waay..