How can I change the "user picture" for each indivudal user that is displayed during the logon for Windows Vista, 7, 2008, 2008R2 machines throughout a domain?
How can I change the "user picture" for each indivudal user that is displayed during the logon for Windows Vista, 7, 2008, 2008R2 machines throughout a domain?
For the OSs you mention, there is an unpublished function in shell32.dll that is just the ticket. Using it will be unsupported by Microsoft, but I have no had any problem in several environments. The entry point is #262.
You could import it for use in PowerShell like below:
Which would mean you could call it in the same script as simply as:
I have used the following as a logon script that also grabs the image out of AD too:
I should point out that I have since switched to using a compiled .NET app which does the same, but with much better performance - critical at at logon time.
It also gave me the option to call at start-up time and set the image for users that had not yet logged into a machine, which was a nice little addition for new users that got to see their face on their assigned PC rather than the default orange flower!
It might also be worth pointing out that for Windows 8 onwards we had to re-engineer completely - there is a brand new mechanism from MS now.