Jump to content

Recommended Posts

Posted

Hi,

 

We have moved to local profiles and all was working well until I deleted the local profiles in the c:\users\username I think it put them in the registry profilelist. Is it possible to remove them in bulk on multiple machines?

 

 

Thanks in advance

Posted (edited)

What you are trying to achieve?

 

Local profiles are created in c:\users\%username% and if you delete these, it will break the profiles and you won't be able to log on, because the profile info is stored in the regkey below.

 

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList

Edited by djm968
Posted
As above. If you've done this in bulk, you're going to have to script this to delete the keys for your users (avoiding ones you'll want to keep like Default User).
Posted

Hi,

 

Yes that is what I have done delete the local profiles now I need a way to delete the reg keys. Does anyone have a script to do this?

 

Thanks

Posted (edited)

A script using Delprof https://www.microsoft.com/en-gb/download/details.aspx?id=5405 would be better option. This will delete the profiles and remove the regkeys.

 

You can also do this with a GPO (see below). Set the GPO to one or 2 days, and it will eventually clear out all older profiles, but I would set it for longer once old profiles have been cleared off all devices.

 

Computer Configuration > Administrative Templates > System > User Profiles.

 

https://learn.microsoft.com/en-us/answers/questions/441800/group-policy-how-to-automatically-delete-user-prof.html

Edited by djm968
Posted

You can also do this with a GPO (see below). Set the GPO to one or 2 days, and it will eventually clear out all older profiles, but I would set it for longer once old profiles have been cleared off all devices.

 

Computer Configuration > Administrative Templates > System > User Profiles.

 

https://learn.microsoft.com/en-us/answers/questions/441800/group-policy-how-to-automatically-delete-user-prof.html

This is what we do. Just be aware that the folders can take a little while to be deleted due to the sheer number of files within them (mostly in appdata).

We had a machine with over 50 local pupil profiles, and it taken around 15 mins to delete them all in the background after applying the gpo and rebooting.

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