A script is linked with GPO of windows server in which when user logout/sign out from any terminal server managed in aws, backup script run itself and create a backup of registry files and upload it somewhere in cloud storage and then on next log in session restore script render itself and restore the registry file where the last session was saved or logged out. Now the Problem is when same user start using two different terminal server in same domain there is one conflict happening - rather than restoring the same old backup when session starts in second terminal server, it doesn't restore the backup recent created backup but start itself from default values and all saved setting lost itself. I want to create a id based backup in which whenever user start any number of sessions in any terminal server it can restore least old created backup. Is there any way to create such backup I try to find it but couldn't. Timestamp approach has been used already but it's not working properly.
I tried using time stamp but conflict of two terminal servers exist - simple solutions I am looking for id based backup. how can I do it?