Windows 8 Account Picture


  • Hi, 

    I would like to set the user account picture via PowerShell for a domain user.

    I've already tried to copy the accountpicture-ms to C:\Users\$CurrentUser\appdata\Roaming\Microsoft\Windows\AccountPictures and set the corresponding registry key

    Set-ItemProperty -Path
    -Name SourceId -Value $AccountPicture -type string

    There is an API ( for Win8, but I can't figure it out to use it in PowerShell.

    I would like to change the account picture without user interaction

    Any help would be appreciated.


    Thursday, November 29, 2012 3:28 PM

All replies

  • To set the "picture" for domain users (which I have never done), it would probably be best to use the corresponding AD attribute, which is either "thumbnailPhoto" or "picture".

    I do not know if this will achieve what you want on windows 8 clients. On my non-domain windows vista and windows 7 computers at home, the picture appears in the logon screen, the top of the start menu, and in control panel - users. I understand that when these are joined to a domain, the welcome screen is replaced by the typical domain logon dialog box. And, of course, the domain accounts would never show up in control panel - users.

    Al Dunbar -- remember to 'mark or propose as answer' or 'vote as helpful' as appropriate.

    Thursday, November 29, 2012 5:49 PM
  • Are you wanting to set a "default" picture for all users when they login or is it a different picture based on who the user is?
    Thursday, November 29, 2012 7:48 PM
  • Hello Tim,

    I would like to set the picture for every single user not a default picture.

    Friday, November 30, 2012 8:58 AM
  • Hi Peter,

    This might work ;)



    Friday, November 30, 2012 4:27 PM
  • Hi Dan,

    this works in Windows 7 not in Windows 8. :-(



    Monday, December 03, 2012 8:47 AM
  • same problem :(

    how can i set image for local accounts in Windows 8-2012?

    I need use command-line application, or powershell script for change image in group policy

    I found examples

    but they for Windows Store

    Monday, March 11, 2013 10:42 AM
  • I found this way

    but i don`t know how it used with c# :(

    Can anyone test this way?

    Information of using similar method I found in

    "It's ordinal 810 in shell32.dll in all Vista+ OS's including 8"

    Tuesday, March 12, 2013 3:28 PM
  • any solutions?
    Tuesday, March 19, 2013 7:17 AM
  • any? :)
    Friday, April 12, 2013 7:09 AM
  • I would like to know this too.
    Searching for methods to use the AD picture (indeed, stored in picture or thumbnailPhoto attribute of the ADuser) as the user picture in Windows 8 or Windows 8.1.

    I am looking for a C# program that can put the picture if I tell it where to get the picture, or a powershell script that incorporates the SHSetUserPicture function from Shell32.dll.

    I found some documentation on that function and found serveral examples on how to use Shell32.dll functions in powershell scripts, but I don't have enought C/C++ knowledge to put it all together :(

    If anyone can have a look at how to use this function from powershell scripts, would be much appriciated!




    Changes a users picture that is displayed at logon and on the start menu.


    HRESULT WINAPI SHSetUserPicturePath (
        LPWSTR pwszAcctName,
        DWORD reserved,
        LPCWSTR pwszPictureFile


    The name of the user to set the picture of
    Reserved, must be 0.
    Path of the file containing the new user picture

    Return Value

    S_OK on success, S_FALSE is the picture to set is the current one, and other common COM errors on failure


    CoInitialize(NULL)/CoInitializeEx(NULL, COINIT_APARTMENTTHREADED) must be called prior to calling this function.

    Friday, October 04, 2013 6:09 PM
  • Hello,

    someone has been successful for this job?


    Monday, November 25, 2013 9:54 AM
  • Hi all!

    Not a clue if anyone still needs this but I found this:

    It's a executable and GPO combo, fully explained on that page.

    The author even has a download link for the source code up.


    There's a new blog in town:

    Thursday, May 01, 2014 1:22 PM
  • That page was pretty helpful, I re-wrote the code into PowerShell for anyone who's interested:


    Friday, June 13, 2014 11:47 AM