I am migrating my users from a Server 2012 R2 farm using Roaming Profiles to a Server 2019 RDS deployment using User Profile Disks. I have created a script that will copy the "important" folders from the UNC where the roaming profile is stored into the user's new UPD, and have deployed that script via GPO as an immediate schedule task that only is created if a particular "Profile migrated" flag is non-existent (which the script obviously creates).
It is works very well under "normal" circumstances.
But, if a user happens to log on and their UPD is locked (an admin user primarily, who has the rights to log into multiple session host servers at once, and knows that this might happen under those conditions) and they get assigned a temporary profile/UPD, I want to detect that and NOT run the script.
I have not found a reliable way that I can check to see if the current session is using a temporary profile that I can use in "Item Level Targeting" to further filter and prevent this scheduled task from being created if the user is running under said condition.
Any suggestions? Registry settings seem to be the most likely candidate, but I haven't found one that works yet.
0 Answers