I've been working on setting up OneDrive for Business with automatic syncing and folder redirection. I got everything working, but there were some issues along the way. In dealing with those issues I've messed up my profile on this particular workstation. What messed it up is the fact that a while back I had to rename my AD username to not include spaces. Because of this my local directories, which were still using my name with a space instead of a period, did not match my AD username. When I tried using the %username% variable in my folder redirection, it didn't work because of this. So what I did is log into another admin account, rename my user folder to my new AD name, and replaced all instances of my old AD username with the new one. Well, this worked and folder redirection started to move stuff around. Well, when I deleted my old user folder and created the appropriate folders in the new user folder I've realized that some fundamental functionality seems to be broken now. For example, if I place something into my C:\Users\NewProfileName\Documents folder, it does not appear in my OneDrive\Documents folder as I thought it should.

The point of all that is that I've messed up my local profile, and I'd like to start from scratch. How can I make this workstation think my AD user profile has never been logged into on this machine so that I can start from the beginning with default folders that are in a user folder that matches my AD username? I've already checked the User Profile Management in the Control Panel, and only the locally created service profile is listed there. Any domain accounts that have used this workstation are not listed, including my own. Thanks very much for any responses in advance, and I'll be glad to provide all the information I can if more is required.


Go to the System properties, choose "Advanced", then click on "Settings..." in the "User Profiles" section:

enter image description here

From there, you can see a list of all the user profiles stored on the computer, and you can also delete them, if they are not in use.

  • I believe Dave mentioned in his question that he already checked here. – Ryan Ries Oct 29 '14 at 21:12
  • Actually, this is a different user profile menu than I was using. This one actually lists the domain profiles. The one I accessed through the control panel only listed the local profile. – Dave Oct 29 '14 at 21:20
  • This worked out great, thanks very much. I didn't know this menu existed because I've only worked with local profiles before, and they all show up in the control panel's user management. – Dave Oct 29 '14 at 21:47
  • +1 for not forgetting the obvious. :) – Ryan Ries Oct 29 '14 at 22:15

Just two or three things. Delete the

C:\Users\Dave.Domain folder (using another administrative user.)

You may need to use the command rd /s to bypass MAX_PATH limitations if the directory structure contains very long path names.

And then delete

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\S-1-5-21-xxx-xxx-xxx

from the registry, where the SID corresponds to Dave's domain account. Whack any *.bak versions in there two that have that same SID while you're there.

Delete the S-1-5-21-xxx-xxx-xxx nodes in HKEY_USERS that correspond to Dave's domain user's SID as well, if there is one.

At this point, it'll be like Dave's domain account had never logged on to that machine.

  • You could also knock out the entry in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileGuid for the user, too. It doesn't matter fron a functional perspective, but if you really want to make it "like they never logged on". – Evan Anderson Oct 29 '14 at 20:53
  • While doing this manually might work, it could leave lingering informations (mainly Registry keys) around. The right way to do it is from the System properties. – Massimo Oct 29 '14 at 20:57
  • Had Massimo not shown me the System User Management dialogue, this would have been what I would have done. Thanks very much for the suggestion. I'd upvote you if I had the rep, but hopefully my gratitude is enough for now. Thanks, Ryan. – Dave Oct 29 '14 at 21:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.