How to completely delete a profile on Windows Server 2008

We are using Citrix XenApp v5.5 environment which is installed on Windows Server 2008 x86 servers.

One of our applications won't map printers, although the problem is fixed once we delete the user profile on the server.

Now, I know that the proper way to delete the user profile is to use Advanced System Settings and delete profiles from there, but I need a script that would completely delete all user profiles on the server.

Can someone help?

Thanks!
LVL 17
NikSystems SpecialistAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

sunilswainCommented:
Hi,

There are different options.. using tools or using scripts. Check the following:
 scripts:
1) http://www.theshonkproject.com/index.php?option=com_content&task=view&id=50&Itemid=1
2) http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=161775&site_id=1#import

GPO n other tools:
1) The policy setting is at Computer Configuration->Administrative Templates->System->User Profiles->Delete cached copies of Roaming Profiles

User Profile Hive Cleanup:
http://www.microsoft.com/downloads/d...DisplayLang=en 

-Sunil
sunilswainCommented:
Forgot about the utility "delprof.exe". Use delprof.exe on the resource cd.
delprof /Q will do.

-Sunil
NikSystems SpecialistAuthor Commented:
This works for Windows Server 2003, but will not completely deleter profiles on Windows Server 2008
Exploring SharePoint 2016

Explore SharePoint 2016, the web-based, collaborative platform that integrates with Microsoft Office to provide intranets, secure document management, and collaboration so you can develop your online and offline capabilities.

sunilswainCommented:
For Windows 2008, You will need a clean local profile stored on the server in the users folder(default location) and also from [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList]. Delete the sid that are failing.

-Sunil
sunilswainCommented:
Sorry typo - **You will need to clean **
NikSystems SpecialistAuthor Commented:
We have made a script to completely delete the Windows 2008 profile, that I will post on EE soon.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
NikSystems SpecialistAuthor Commented:
I have found the solution myself.
calvinngheCommented:
We are experiencing the same problem regrading Windows 2008 profiles. Do you mind sharing your script?
NikSystems SpecialistAuthor Commented:
Hi there calvinnghe,

I've just posted it on my web site. Hopefully it will help.
http://www.wincert.net/tips/windows-server/2285-how-to-completely-delete-a-windows-server-2008-profile-with-script.html

Regards,
Nik
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VB Script

From novice to tech pro — start learning today.