Handling UserProfile Picture Sync In VDI (Win7 – Citrix UPM)


When a domain user changes their profile picture, the following files are created.

  1. Image is created and placed in AppData\Local\Temp\<UserDomain>.bmp
  2. Config is stored in %ProgramData%\Microsoft\User Account Pictures\<UserDomain>+<UserName>.dat

This change by default does not roam with the user, but can be achieved by following the steps below.

Step 1

Have Citrix UPM sync the bmp image if %temp% has been excluded from being synced.
Profile Management\File system\Synchronization

step 2

Have a logoff script copy the config dat to UPM profile store.
In my case; Ctx User Profile Store is \\Dfscluster\ufs\%username%\ctxprofiles; I am also creating a sub folder called CUSTOM and dropping the DAT file in there.

###########################################################################
#
#
NAME: Logoff.ps1
#
#
AUTHOR: smulpuru
#
#
COMMENT:
#
#
VERSION HISTORY:
#
1.0 1/21/2012 – Initial release
#
#
##########################################################################
if(test-path C:\ProgramData\Microsoft\User Account Pictures\$(cat env:\userdomain)+$(cat env:\username).dat)
{
if(!(Test-Path \\Dfscluster\ufs\$(cat env:\username)\ctxprofiles\CUSTOM))
{
New-Item -ItemType directory -path \\Dfscluster\ufs\$(cat env:\username)\ctxprofiles\CUSTOM -force -ErrorAction SilentlyContinue
}
Copy-Item C:\ProgramData\Microsoft\User Account Pictures\$(cat env:\userdomain)+$(cat env:\username).dat \\Dfscluster\ufs\$(cat env:\username)\ctxprofiles\CUSTOM
}

Step 3

Have the user preference GPO copy the file, timing is key here; this config dat file should be present before explorer process is started. Hence the GPO approach.


That’s It 🙂

Reference(S)

Join the Conversation

1 Comment

Leave a comment

Your email address will not be published. Required fields are marked *

WordPress Appliance - Powered by TurnKey Linux