[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1622
  • Last Modified:

Windows 7 User Profile Service Error

I enabled "Delete User Profiles Older than X number of days" on four test machines. These machines are running Windows 7 Enterprise.

At first, no old profiles were being deleted. I disabled Windows Defender (as a test) because it was scanning the NTuser.dat file in each local profile. This would change the modify date on the profile which prevented the User Profile Service from deleting it.

Now, the user profile service is cleaning up old profiles but it always leaves the old profile behind with a few empty folders under AppData. Event viewer shows error messages for each profile. They read.

Event 1533: User Profile Service

Windows cannot delete the profile directory C:\Users\USERNAME\. This error may be caused by files in this directory being used by another program.

DETAIL - The directory is not empty.
0
Joseph Moody
Asked:
Joseph Moody
  • 3
1 Solution
 
AwinishCommented:
Some files in profile is in use so it find difficult to delete as they are in access, as i have seen inorder to delete someone else profile sometime server has to be booted into normal or safe mode.

You can use UPHclean.

http://blogs.technet.com/b/uphclean/
http://sgwindowsgroup.org/blogs/arther/archive/2009/11/26/uphclean-beta-build-2-0-48-0.aspx
0
 
AwinishCommented:
0
 
Joseph MoodyBlogger and wearer of all hats.Author Commented:
I ended up using this as a user profile management script. Thanks!
0

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now