User account deleted but home directory still exists

windows-server-2008-r2

I just deleted a user account on a Windows Server 2008 R2. Yet her user home directory still stands at c:\Users\her-account-id.

Moreover, using regedit I can still see HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\ProfileList\blah…. and HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\hivelist\blah entries matching her account.

When I deleted her account (using Control Panel) I checked the "Delete files" check box also.

What can I do to remove her user home dir ?

Thanks in advance,

phep

Best Answer

On Windows 2000+ it is not possible to completely get rid of user's account. However it should be enough to simply delete it, from both security and licensing reasons.

As for Windows Server 2008+, to delete user with its home directory:

  1. Open System in Control Panel.
  2. Click Advanced Settings, and on the Advanced tab, under User Profiles, click Settings.
  3. Under "Profiles stored on this computer", click the user profile you want to delete, and then click Delete.

Or you can write a script in PowerShell, VBScript, JavaScript, batch or anything else, that will first delete user, and then delete its home directory, even on remote computers in your domain.