After Enterprise deployment of Windows 10; organisations are faced with sporadic user profile corruption.
The corruption seem to happen for the 2nd user and other users from then on.
The corruption seem to follow a 'Sleep' phase (after the machine wakes up)
The corruption seem to happen if the 'Sleep' extends over night.
The corruption only seem to happen if the 'currently logged on' user is not logged out but the new user logs-in by 'switching accounts'.
Event logs specify the C:\default\ntuser.dat file being locked by the SYSTEM user.
My supposition is that this might be a BUG in the new user profile creation process in Windows 10. But the below implementation fixes the above issue gracefully and permanently.
In short, C:\default\ntuser.dat is locked by the SYSTEM; only the SYSTEM can give it back to you. So request the SYSTEM to release control (ask nicely). Ask the SYSTEM to release control on event ‘On Local disconnect from any user session’. Run the Schedule-task as SYSTEM.
Create a schedule task using AD group policy with the below configuration.