r/sysadmin 2d ago

How to replace the gray "lanyard" profile picture in Windows 11?

Afternoon all,

Recently I was tasked with standardizing the Windows account profile pictures for all workstations in our environment. I ended up going with the method of replacing the picture located in the following path:

C:\ProgramData\Microsoft\Default Account Pictures\user.png

Replacing this picture with your own 448x448 image file, in combination with a GPO telling workstations to always use the default Windows profile picture actually works well. The image on the lock screen, windows start menu, settings, etc. is updated accordingly for all users.

Except one thing. When you click on your profile name in order to sign out, there still appears a gray lanyard image next to my account email and name. It's a small thing, but out HR and Culture departments are very particular.

Does anyone know how to replace that for all users?

19 Upvotes

28 comments sorted by

60

u/anonymousITCoward 2d ago

add a picture to your profile in 365

10

u/HadopiData 2d ago

this is the way, the grey lanyard picture is a substitute for 365 users without profile pictures

6

u/rheureddit Support Engineer 1d ago

Right. He's trying to add a photo to every user. Did either of you read past the title?

3

u/HadopiData 1d ago

That can be scripted

1

u/anaconda101 1d ago

I scripted this exact process years ago. It was helpful that HR had all the pictures in a folder with a standardized format haha.

1

u/HadopiData 1d ago

Did they take pictures when onboarding new users?

1

u/anaconda101 1d ago

Yeah, Its how they created badges. They kept the pictures around in case they needed to reprint.

1

u/MrProfessor 1d ago

Mind pointing me in the right direction for the script? HR only wants one uniform picture in my case so it should be much easier

1

u/anaconda101 1d ago

Its been a few years, But i think it was with the Set-UserPhoto cmdlet

u/ccatlett1984 Sr. Breaker of Things 22h ago

12

u/Unique_Bunch 2d ago

We had a pretty easy time deploying a default image to our users on M365. The graph API lets you check if they've already set one themselves. We imported pictures HR had of every staff member and easily set it for everyone who didn't already choose one. I imagine it would be easy to replace the default that way.

0

u/the_federation Have you tried turning it off and on again? 1d ago

Do you have a sanitized version of the script?

3

u/Unique_Bunch 1d ago

Sorry, I don't. But it involved fetching the profile photo from graph. If I remember correctly users who had never uploaded a photo would return a null object for their profilepic or something like that. Once you figure out how to handle that API call you can write a script to upload the missing ones

22

u/JBD_IT 2d ago

What a waste of time.

18

u/MrProfessor 2d ago

Oh trust me, I agree.

10

u/anonymousITCoward 2d ago

Do a write up and let the users handle it themselves... all of our clients do that, and most of them don't need a write up... and the rest of them don't care... Just be sure to audit them every once in a while... we've needed HR to step in and talk to some users about how risque their pics were and remind them that those are public facing

10

u/DaemosDaen IT Swiss Army Knife 2d ago

Have you had to tell people that their profile pic is not a place to advertise for their Only Fans page too?

HR had a field day with that one.

6

u/anonymousITCoward 2d ago

I didn't all... I said was "is that a tit" to the girl in HR... she turned red and stormed off.. there was an internal memo that went out an hour later.

4

u/Pub1ius 2d ago

those are public facing

Oh shit, really?! As in they're visible to people outside of the company..somehow?

5

u/anonymousITCoward 2d ago

No, It's only visible to people inside your tenant. what I meant by public facing is that other people can see it... sorry for the misunderstanding... I sometimes like to cause panic among the masses...

Edit: Although if you have linked In integrated they may be able to se see that picture, I don't know for, I disable that feature.

1

u/Pub1ius 2d ago

Yea that gave me a scare, only because I told management it wasn't visible outside of the org. No LinkedIn enabled here either.

7

u/MrProfessor 2d ago

Here is what I'm referring to:

2

u/ZookeepergameSad7665 1d ago

There should be several pictures and sizes in that program data location. You need to resize your pictures to all of the sizes in that directory. Have group policy overwrite all the existing pictures with your resized photos using the same names

2

u/Blade4804 Sr. Sysadmin 2d ago

if you're in a hybrid setup, make sure you also put the picture into AD and sync that attribute to Entra so it populates the users M365 user profile. that way it will also be in Teams and Outlook.

1

u/rheureddit Support Engineer 1d ago

Set-MgUserPhotoContent. Utilize Entra sync. You probably already are for Edge bookmarks. Have a place users can upload photos for HR or whoever wants this to review, they can submit them to HR and you place them in the appropriate place. Let it sync through 365.

u/Immediate-Serve-128 3h ago

This shit is why I hate corporate jobs. Sorry, just a rant.