How do i remove user profiles in windows 10

Hi,
I have an issue on our Windows 10 computers on our domain, we run a GPO to remove user profiles after 21 days if not logged in, this works fine on Windows 7. In Windows 10 it removes the profile out of control panel and user-profiles and the folder from C:\users but there is a registry key left that looks like this:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\S-1-5-21-673461941-2943002750-4263894529-13153
There are lots of them depending on how many users have logged onto the PC when a user then logs on they get the error: The user profile service failed the sign-in. The user profile cannot be loaded.
If I delete the REG Key for that user, I can then log in, this is becoming quite an issue across our Network, I have tried PS scripts and DELPROF2 and having no luck clearing the REG Keys, If I could script this would be great, tried a PS script to remove the keys as a wildcard, but that did not work either.
Can someone please help? which can guide to resolve this issue
Thanks a lot

Hello @the_joe

Follow these steps to solve the problem.

Hello

did you try this?

please follow this link