Can anyone tell me if it is possible to delete profiles on workstations with SCCM that are older that 7 days? I know there is a GPO for this, but it doesn't appear to be working. My thinking is I can run a script Script in SCCM every Friday to do the same thing.
Well you could use this porwershell script and have SCCM run it.
https://gallery.technet.microsoft.com/scriptcenter/How-to-delete-user-d86ffd3c
not sure it`s the best approach to have SCCM take care of this.
So you could just make a package with a deployment that run every X day.- Proposed as answer by Peteris 12 hours 58 minutes ago
- Edited by Frederick Dicaire 12 hours 52 minutes ago
Well you could use this porwershell script and have SCCM run it.
https://gallery.technet.microsoft.com/scriptcenter/How-to-delete-user-d86ffd3c
not sure it`s the best approach to have SCCM take care of this.
So you could just make a package with a deployment that run every X day.- Proposed as answer by Peteris Monday, August 31, 2015 6:52 PM
- Edited by Frederick Dicaire Monday, August 31, 2015 6:59 PM
- Marked as answer by Joyce LMicrosoft contingent staff, Moderator 21 hours 33 minutes ago
I have not, I ran the Script stand alone to see what the behavior would be, this is when I noticed that it confirms deletion for the profiles.
Yeah the script itself would need some modification to be able to run via SCCM like that. The goal was to take what you want from the script and modified it to your liking.
The simple thing you could change is to remove the part where the powershell script ask for Yes it's the section called $choice you would need to reflect the removal of it in all the section.