Jump to content

Recommended Posts

Posted

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

Posted
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.
Posted
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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...