Setting a Team Picture with PowerShell

Sometimes the Global Administrator Isn’t All-Powerful

A query about the Set-TeamPicture cmdlet asked whether global administrators were allowed to update the picture for a team. An example of running the cmdlet is as follows:

Identifying a Team Through Its Office 365 Group

Of course, it’s hard to remember the GUID to identify a team, so I often end up calling the Get-UnifiedGroup cmdlet to return the object identifier. Unlike Get-Team or any of the other cmdlets in the Teams PowerShell module, the Office 365 Groups cmdlets are part of the Exchange Online module and accept identifiers like display names. Here’s what I do:

After a short time to allow clients to refresh, the picture shows up in Teams:


Only Team Owners

To come back to the original question, only team owners can run Set-TeamPicture to update the picture for a team. The reason why is that the original Teams PowerShell module set out to duplicate how the Teams client works, and only  owners can update a team picture through the Teams client.

Any attempt by a non-owner to update a picture gets a nice access denied error:

Set-TeamPicture is covered in Chapter 14 of the Office 365 for IT Pros eBook along with lots of other information about using PowerShell with Teams and Office 365 Groups. You might find it an interesting read!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.