When a domain user changes their profile picture, the following files are created.
- Image is created and placed in AppData\Local\Temp\<UserDomain>.bmp
- 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)
- http://deployment.xtremeconsulting.com/2010/06/23/usertile-automation-part-1/
- http://support.citrix.com/proddocs/topic/user-profile-manager-kib/upm-reference-adm-settings-den.html#upm-reference-adm-settings-den__upm-link-sync
- http://msdn.microsoft.com/en-us/library/windows/desktop/bb776892%28v=vs.85%29.aspx
Leave a comment