delete user profile of 'service' account

Anonymous
2024-02-15T08:33:22+00:00

In server 2022, I use for some services a separate domain account. The account is loaded in the registry when the service is started. But if the service is stopped, the user hive is not unloaded.
I tried with a fresh installed server 2022 not domain joined and with a local user. It had the same behavior.

My intention was to stop the service, delete the user profile. So the user settings would be synced again with the default user profile settings.

Because I don't have much downtime on some servers I didn't want to stop the service, put it on manual, reboot the server, ...

Windows for business | Windows Server | Directory services | User logon and profiles

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question. To protect privacy, user profiles for migrated questions are anonymized.

0 comments No comments
{count} votes

10 answers

Sort by: Most helpful
  1. Anonymous
    2024-02-16T02:27:21+00:00

    Hello Ruben Leyssens,

    Thank you for posting in Microsoft Community forum.

    You can try to delete the service account and password via opening services.msc, and find the account and password and delete it.

    I hope the information above is helpful.

    If you have any question or concern, please feel free to let us know.

    Best Regards,
    Daisy Zhou

    1 person found this answer helpful.
    0 comments No comments
  2. Anonymous
    2024-02-19T13:18:08+00:00

    If I remove the account on the service, it still does not unload the user hive in the registry.
    So I still can't delete the user profile.

    Testing on Windows Server 2022 (21H2)

    0 comments No comments
  3. Anonymous
    2024-02-20T05:55:06+00:00

    Hello Ruben Leyssens,

    Good day!

    As I understand, the user account is also a service account, you want to delete the user profile of this user account.

    If the user profile is in C:\Users\username?

    If so, you can try to delete the user profile folder and delete the user profile list in registry and delete the user profile in Control Panel.

    Delete a user profile in Windows - Windows Server | Microsoft Learn

    Note: If there is any data in this user profile, please back up them before you delete the user profile.

    Best Regards,
    Daisy Zhou

    0 comments No comments
  4. Anonymous
    2024-02-22T12:35:13+00:00

    Hi,

    I already tried that.
    You can't delete the user folder because the user hive is still loaded so NTUSER.dat is 'in use'.
    Delete in control panel is grayed out.
    Through regedit, unload hive : access denied error.

    0 comments No comments
  5. Anonymous
    2024-02-23T02:32:48+00:00

    Hello Ruben Leyssens,

    Good day!

    *Delete in control panel is grayed out.*A: You can sign in the machine using Administrator account. *Through regedit, unload hive : access denied error.*A: You can try to change the permissions on registry and then check if you can delete the specific profilelist in the registry you want.

    Best Regards,
    Daisy Zhou

    0 comments No comments