Jump to content
Welcome to our new Citrix community!
  • 0

Persistent VDA profiles being 'reset'

Bill Gruber


We've got an issue where randomly we'll have a user complaining their profile was reset on persistent win10 VMs.  I've not really been able to track down anything in the logs, event viewer, the hypervisor that shows where the profile or VM was reset.   We've had this happen to 3 or 4 users over the past few months and are really scratching our heads on this one.  Any help or direction is appreciated! 

Link to comment

2 answers to this question

Recommended Posts

  • 0

We have seen this and it was a long road to discover the root cause. It may be same issue for you as the symptoms sound the same.



Per Microsoft, when GP setting “Delete user profiles older than a specified number of days on system restart" is configured:
Starting in Windows 10 RS5, build 1809, how profile age is determined was changed to track the profile load and unload times from using the modified time stamp of the ntuser.dat file in previous versions. This is tracked in the following registry values in the user's ...\ProfileList\<SID> key.
•    LocalProfileLoadTimeHigh
•    LocalProfileLoadTimeLow
•    LocalProfileUnloadTimeHigh
•    LocalProfileUnloadTimeLow
These are updated when a user logs on for the load time and when a user logs off gracefully for the unload time. If the unload time stamp information is not successfully updated the profile will eventually be considered stale even though the user has logged on more recently.


We found in limited numbers that users experience this issue. In the world of VMs it is not uncommon for a user to remain logged in to a VM for months. Patching may log them off, but this appears to not be graceful in the sense that MS references.

One of our admins pulled together this code to identify profiles that are older than 100 days (our policy is set to delete at 120 days old). That gives us enough time to reach out to the user and resolve the issue before the profile is deleted.


$Desktops = Get-BrokerDesktop -maxrecordcount 1000 |
    where {$_.CatalogName -eq "YourCatalogName" -and $_.PowerState -eq 'On'} |
    select Machinename,dnsname,@{l="AssociatedUserNames";e={$_.AssociatedUserNames -join ";"}}
$DaysOld = (Get-Date).AddDays(-100)
Foreach ($Desktop in $Desktops) {
    $AssociatedUserNames = $Desktop.AssociatedUserNames.split(';')
    Foreach ($AssociatedUserName in $AssociatedUserNames) {
        $UserName = $AssociatedUserName.split('\')[1]
        $Results = (invoke-command -ComputerName $Desktop.DNSName -ScriptBlock {Get-ItemProperty -path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\*"}) | 
            where-object {$_.ProfileImagePath -match $UserName} |
            select pscomputername,LocalProfileUnloadTimeHigh,LocalProfileUnloadTimeLow,profileimagepath
        Foreach ($Result in $Results) {
            $UnloadTimeHighDec = "{0:x}" -f $Result.LocalProfileUnloadTimeHigh
            $UnloadTimeLowDec = "{0:x}" -f $Result.LocalProfileUnloadTimeLow
            If ($UnloadTimeHighDec -ne "$Null" -and $UnloadTimeLowDec -ne "$Null") {
            $Work = nltest /time:$UnloadTimeLowDec $UnloadTimeHighDec
            [DateTime]$DateTime = $work.split("=")[1]
            If ($DateTime -lt $DaysOld) {
                Write-Host $Result.PSComputerNAme $Result.ProfileImagePath $DateTime
        Else {
                Write-Host $Result.PSComputerNAme $Result.ProfileImagePath Profile unload registry time not found.


Link to comment
  • 0

Thanks Daryl, it ended up being us not doing enough initial digging to find out what was really going on and relying on the info we were provided by others(yes I know....).  What ended up happening is users were moved off a home drive to oneDrive and this led to them losing configurations, etc and let to the thought the profiles were reset. Restored the home drive data to Onedrive and problem resolved.  I'll get this in my pocket though, just in case.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...