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 "Registry::HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\AccountPicture" -Name SourceId -Value $AccountPicture -type string
There is an API (http://msdn.microsoft.com/en-us/library/windows/apps/br241881.aspx) 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.
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.
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
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"
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 (
- The name of the user to set the picture of
- Reserved, must be 0.
- Path of the file containing the new user picture
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.
Not a clue if anyone still needs this but I found this:
It's a VB.net 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: http://msfreaks.wordpress.com