PowerShell Script request for Delete Citrix XenApp 6.5 temp profiles.

PowerShell Script request for Delete Citrix XenApp 6.5 temp profiles.
Windows 2008 R2
XenApp 6.5
Local and Roaming Profiles

Users login from different locations.
Facing issues with temp profiles getting created.
Few users have local Citrix profile and few users have roaming profiles.
Tried to run delprof but if running it's clearing all the profiles.
Please provide a PS script:
PowerShell Script should ask to take a backup, before deleting the profile.
Murty MAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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.

Dirk KotteSECommented:
Deleting a roaming user profile from filesystem is not a good idea, without removing the corresponding registry entries.
Otherwise your users get temporary profiles afterwards.
You don't use citrix profile management ... correct?

Because this is'nt only a citrix problem, i add some Microsoft / Terminalserver topics.
Murty MAuthor Commented:
Yes, we are not using UPM or any other profile management software.
Please suggest, how to resolve the issue.
Dirk KotteSECommented:
If users logged on with temporary profiles, you can find the source of the problem within eventlog.
there are some options to solve this problem ...
You should remove profiles this way: "Advanced settings of System / Advanced settings / Userprofiles / delete"
If this is not possible anymore ...
Var 1: locate and remove the corresponding registry key from HLM/SOFTWARE/Microsoft/Windows NT/CurrentVersion/ProfileList/xxx
Var 2: copy an existing userprofile folder named like the missing profile-folder, grant rights for everyone try to remove the profile via "Advanced settings of System / Advanced settings / Userprofiles / delete"

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
Murty MAuthor Commented:
Thank you.
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

From novice to tech pro — start learning today.