sullivane Posted May 17, 2016 Posted May 17, 2016 Wondering what people are doing to keep windows profiles clean. We used to use DELPROF2 during the summer, but we are starting to order SSDs now, which are smaller. Wondering what you are using to keep them clean on a daily\weekly basis.
SHimmer45 Posted May 17, 2016 Posted May 17, 2016 (edited) im sure there is a GPO which you can set with a age limit on profiles on the machine. either that or just create a scheduled task to run delprof **edit** have a look at this How to Automatically Delete User Profiles Older Than a Certain Number of Days Using Group Policy - TechNet Articles - United States (English) - TechNet Wiki Edited May 17, 2016 by SHimmer45 1
sullivane Posted May 17, 2016 Author Posted May 17, 2016 There is a GPO, however I've been testing it and doesn't seem to work, still investigating though. Just wondering what other people are using that seems to work for them
LeMarchand Posted May 17, 2016 Posted May 17, 2016 Not at the site that uses this today (smallish SSDs, lots of users in suite) but the policy linked above looks familiar and, assuming it is that one, seems to be working.
sullivane Posted May 17, 2016 Author Posted May 17, 2016 Looking at our test machine, I think that policy might actually be working. HOWEVER, it leaves the profile folder there, but it's empty. That doesn't seem to be a proper solution. Profiles are also showing up in the user profile list from system properties.
LeMarchand Posted May 17, 2016 Posted May 17, 2016 Looking at our test machine, I think that policy might actually be working. HOWEVER, it leaves the profile folder there, but it's empty. That doesn't seem to be a proper solution. Profiles are also showing up in the user profile list from system properties. I'll try to remember to take a look, but IIRC when I first set it up it was removing the folders completely.
sullivane Posted May 17, 2016 Author Posted May 17, 2016 I'll try to remember to take a look, but IIRC when I first set it up it was removing the folders completely. Thanks. I have been playing around with using DELPROF2 at login with a scheduled task. Was running into issues where it was deleting the profile of the student logging in.
Bladez Posted May 17, 2016 Posted May 17, 2016 i used to have a script i made years ago that ran on each machine at logoff, so if the user was a student, they have a number at the front of their username, so it would check the users folder on c drive, and delete any that matched, it also did the same with the registry. i can dig it out if you want to have a look at maybe changing it to suit your needs.
Meldrew Posted May 17, 2016 Posted May 17, 2016 We have a scheduled task that runs delprof2, but only when the machine is idle. Seems to work fine - not come across any problems... Meldrew.
jb2201 Posted May 17, 2016 Posted May 17, 2016 Thanks. I have been playing around with using DELPROF2 at login with a scheduled task. Was running into issues where it was deleting the profile of the student logging in. It should work fine if you set it to run as a startup item rather than a login item. You could create a quick batch file that runs at startup and clears all the profiles.
sullivane Posted May 17, 2016 Author Posted May 17, 2016 We have a scheduled task that runs delprof2, but only when the machine is idle. Seems to work fine - not come across any problems... Meldrew. I have been playing with that, I think it's the best option, however it kept deleting the profiles on the students logged in.
sullivane Posted May 17, 2016 Author Posted May 17, 2016 It should work fine if you set it to run as a startup item rather than a login item. You could create a quick batch file that runs at startup and clears all the profiles. I was not sure if it would run in time, if there are several profiles to clear, the student might log in while it's still running. If their profile is on the list, it would delete it after log in.
ntoupin Posted May 17, 2016 Posted May 17, 2016 That GPO is working for us - I have it set to 30 days in various computer labs. Cleans up the entire profile & folder. I have also used delprof2 to deploy a delete on certain computers that the GPO wasn't deployed to and that worked great too (example below deleting older than 2 weeks) DelProf2.exe /q /ed:default /ed:[ADMINPROFILE]* /ed:public /d:14 Not sure what you use for remotely deploying software but even if you don't have something you could go back to basics and make a scheduled task with a batch file setup that runs this on your specified computers every X days, weeks, etc. if you can't get the GPO to work for some reason.
jb2201 Posted May 17, 2016 Posted May 17, 2016 I was not sure if it would run in time, if there are several profiles to clear, the student might log in while it's still running. If their profile is on the list, it would delete it after log in. Sorry should have said we have the computer policies set so it waits for the script to finish before presenting the login screen.
LeMarchand Posted May 18, 2016 Posted May 18, 2016 Just checked a couple of machines and the GPO is working as intended. Can't see any folders older than the cut off point.
SHimmer45 Posted May 18, 2016 Posted May 18, 2016 would any scanning cause the part of the folder structure to have the last accessed date to be changed to a newer date which would mean it wouldnt be removed
ntoupin Posted May 18, 2016 Posted May 18, 2016 would any scanning cause the part of the folder structure to have the last accessed date to be changed to a newer date which would mean it wouldnt be removed Not sure what you mean by scanning.. easiest way to find out would be check a folder that was "scanned" right after - check it's modified date etc. and you can also test using delprof2 to that folder from cmd line to see if it see's it as "newer" due to the scan.
ntoupin Posted May 18, 2016 Posted May 18, 2016 something like a virus scanner It doesn't affect it on my machines, but I'm not sure if that would be different with different solutions. Again you could test by sending a manually started scan on an older profile and then try deleting with delprof2. It can even be just a day old to test with..
Peter56 Posted May 26, 2016 Posted May 26, 2016 Using this command Delprof2.exe /q /d:25 /ed:admin* it has gone and deleted all the Administrator accounts on the computers Seems strange as it has been running for weeks only delted them yesterday. Any idea of what the command should have been to avoid this happeing again?
sullivane Posted May 26, 2016 Author Posted May 26, 2016 (edited) Using this command Delprof2.exe /q /d:25 /ed:admin* it has gone and deleted all the Administrator accounts on the computers Seems strange as it has been running for weeks only delted them yesterday. Any idea of what the command should have been to avoid this happeing again? What are the administrator usernames? The /ed:admin* only ignores the USERNAMES that start with admin not groups. If an admin account is named peter it will delete it. Edited May 26, 2016 by sullivane
sullivane Posted May 26, 2016 Author Posted May 26, 2016 Not sure then, I use /ed:admin_* and it ignores all our admin profiles that start with admin_ Maybe try /ed:Administrator full name? If you only have one account to ignore, no reason to use wildcard, it's meant for when you have admin accounts with a prefix like admin_ or ad_
ITGURU Posted May 26, 2016 Posted May 26, 2016 I have a startup script that clears all roaming profiles on the C Drive apart from those added as exceptions, i.e Public, Admin, etc. however, I have never found any solution to be 100% effective - I still get the odd workstation where it won't remove the local profile copy, and have to remove manually from Users or from 'profilelist' in the registry when they log on temporary. I also have the GPO set to remove profiles at log off which didn't seem to be as effective on its own without using a script.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now