Are you using those .NET accounts?
You could recreate them or create new account and set rules the way you want.
There is comment in PowerShell called Remove-LocalUser and you may use it to remove user account which is much easier than removing them from registry.
How to restore local accounts on win10

I deployed powershell logic to remove stale profiles from workstations.
the logic had the HKLM path to the profilelist keys in a static string, with a $variable at the end containing the SID of the target key to remove. in the situation where a user had a temp account, and a normal account, the SID was not found and the variable would be blank, therefore removing all the SIDs in the profilelist. I managed to learn .NET overnight to regenerate them by running a powershell script from my computer that connected to the remote registry service, using profileGUID to get the SIDs, and AD to translate those SIDS into usernames, then user profile folder paths.
This is great, but the .NET accounts are now missing. Can I simply uninstall-reinstall .NET to restore those accounts?
2 answers
Sort by: Most helpful
-
Reza-Ameri 14,826 Reputation points
2020-12-23T17:14:26.76+00:00 S.Sengupta 5,871 Reputation points MVP2020-12-24T05:03:45.787+00:00 After you remove a capability SID, you cannot use the UI to add it back.
To delete user profile, there is policy in Computer Configuration -> Administrative Templates -> System -> User Profiles called Delete user profiles older than a specified number of days on system restart and you may enable it and set a date to remove them. Let them connect to domain and then when profile have been deleted, then remove them from domain.