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)

One thought on “Handling UserProfile Picture Sync In VDI (Win7 – Citrix UPM)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s