How do I delete the ntuser.dat file after deleting user from Active Directory?

Posted on 2007-10-19
Last Modified: 2011-08-18
We currently have a server running Terminal Services and when deleting a user in Active Directory, the user is successfully removed but the profile in C:\Documents and Settings\username folder still exists.

When trying to remove these folders we cannot because ntuser.dat in in use. Is there any way we can get rid of this exception and permanently delete these user profiles from our server?
Question by:advfinance
    LVL 30

    Expert Comment

    In the Terminal Server Manager console on the TS box, does the user show as having an active sesion?  If so, log it off and you should be able to whack the profile.

    Also try a simple "del /s" from the command-line, if deleting from the Explorer GUI is still erroring.
    LVL 5

    Author Comment

    Thanks for your reply. I had a look at Terminal Servives Manager, and there are no active sessions, bearing in mind which I failed to mention previously that these users are staff that have left our company.

    I also tried deleting from the windows gui and the del /s from the command prompt with no joy. I also tried using the program Unlocker 1.8.5 to see if there are any handles on this file. Will let you know how it goes.
    LVL 30

    Accepted Solution

    You can also give this cleanup tool a try, can come in handy if the deleted user's profile did not unload gracefully the last time they exited the TS session:

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Join & Write a Comment

    I've always wanted to allow a user to have a printer no matter where they login. The steps below will show you how to achieve just that. In this Article I'll show how to deploy printers automatically with group policy and then using security fil…
    ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
    This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
    This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now