MVP - Most Valuable Professional
rss

Just can't get enough of IT

This blog is about mostly anything in IT. But the primary focuses are Microsoft Technologies like Exchange, Office 365, Azure and Cloud Security.
On June 3, 2019
0 Comment
458 Views

PowerShellDescription

When using this PowerShell script you can update the guest user's thumbnail photo to a photo that aligns with your company's CI and you do not have to rely on the Azure AD default photo.

This script set the AzureADThumbnailPhoto for guest users to a photo provided as JPG or PNG file.

The photo file can be up to 100KB in size. This is currently not checked in the script.

You can either update a single guest user or all guest users.

When updating the user photo can choose to set the photo forcibly or only if there is no photo set.

The changes are written to a log file. The log file functions are part of the GlobalFunctions module.

 

Examples

# EXAMPLE
# Set the photo ExternalUser.png for all guest users if no photo exists

.\Set-GuestUserPhoto.ps1 -FilePath D:\Photos\ExternalUser.png -GuestUsersToSelect All -UpdateMode SetIfNoPhotoExists

# EXAMPLE
# Set the photo ExternalUser.png for guest user JohnDoe@varunagroup.de if no photo exists

.\Set-GuestUserPhoto.ps1 -FilePath D:\Photos\ExternalUser.png -GuestUsersToSelect Single -UserPrincipalName JohnDoe@varunagroup.de

 

Version History

  • 1.0, Initial community release

 

Links

 

Follow

Read More »