New-UDAvatar Usage

Product: PowerShell Universal
Version: 2.3.0

I have a dashboard set up that is authenticating users by using their $Credentials to read the domain. I also have a Published Folder that holds the thumbnailPhoto for every AD user. I was hoping I could use that Published Folder and the $Credentials.UserName to show the currently logged-in user’s AD photo as the avatar in the upper-right. I’ve seen mention of a New-UDAvatar cmdlet on the forum and a GitHub file, but nothing in the docs on how to get it working.

Was hoping something like this would do the trick, but I guess I don’t really know where to put it to make it work as expected.

New-UDAvatar -Image "/ADPhotos/$($User.UserName).jpg"

Any advice?


I think $user is just the user name. Try: New-UDAvatar -Image “/ADPhotos/$($User).jpg”

1 Like

Yeah, that was my bad, still had that in the clipboard and didn’t double-check it. That displays my AD photo, just don’t know how to get it in the header as the avatar next to my username


2nd this

We’ll have to put an enhancement in for this. There currently isn’t any way to configure that in the navigation bar.

1 Like

Understood, thank you! Do I need to open an issue on GitHub for this?

I opened one already. Thanks!

hi @MrAlexFranco how do you get the logged in user ID in the top right hand corner? I can’t find anything in the docs.

That happens automatically for logged in dashboards but if you want to access the current user name, use $User.

More variables listed here: Dashboards - PowerShell Universal

1 Like

thanks, odd I don’t see this on any of my dashboards and they all have authentication.