edhallpg9 Posted July 11, 2018 Posted July 11, 2018 I have Windows 10 boxes in the classroom. I have limited drive space and wondering if anyone has an automated script in which I can delete and remove all the folders under the "C:\Users" that contain a ".". Any help would be greatly appreciated as I would like to run this script every summer... Thanks, Ed
elsiegee40 Posted July 11, 2018 Posted July 11, 2018 As every file path contains a full stop, I cannot understand what you are trying to do
MatthewL Posted July 11, 2018 Posted July 11, 2018 If you want to clear profiles off the computers look at delprof.
chazzy2501 Posted July 12, 2018 Posted July 12, 2018 You can set a Group policy that clears profiles after x days. Computer config/admin temp/system/user profiles/"delete user profiles older than" 1
subway_lunch Posted July 12, 2018 Posted July 12, 2018 Delprof2 will do this is a wildcard in the /id field set to *.*
clareq Posted July 12, 2018 Posted July 12, 2018 Don't just delete the folders under Users - whenever a profile is created on a machine a corresponding registry entry is made. If you just delete the folder without removing the profile correctly, either through Advanced System Settings or with delprof2, the users will get an error when they try to log on subsequently.
ShellfishClive Posted July 12, 2018 Posted July 12, 2018 You can set a Group policy that clears profiles after x days. Computer config/admin temp/system/user profiles/"delete user profiles older than" If you are trying to delete profiles then what @chazzy2501 said is your best option, you could just set it for tomorrow and move all the machines into that OU for the day and move them out once they pick up that policy. It's far cleaner than deleting just the folders.
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