Commands › Exchange Online
Get-UserPhoto
View information about the user photos feature that allows users to associate a picture with their account. User photos appear in client applications, such as Outlook, Microsoft Teams, and SharePoint. **Note**: In Microsoft 365, you can manage user photos in Microsoft Graph PowerShell. For instructions, see Manage user photos in Microsoft Graph PowerShell.
Quick start script
# Get-UserPhoto — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-ExchangeOnline -CertificateThumbprint $thumb -AppId $appId -Organization $org
# 2. Run and inspect
Get-UserPhoto | Format-List
# 3. Export for evidence / drift tracking
Get-UserPhoto | Export-Clixml .\UserPhoto-$(Get-Date -Format yyyyMMdd).xml
Syntax — 2 parameter sets
AnrSet
Get-UserPhoto [-Anr <String>]
[-Credential <PSCredential>]
[-DomainController <Fqdn>]
[-Filter <String>]
[-GroupMailbox]
[-IgnoreDefaultScope]
[-OrganizationalUnit <OrganizationalUnitIdParameter>]
[-PhotoType <String>]
[-Preview]
[-ReadFromDomainController]
[-ResultSize <Unlimited>]
[-SortBy <String>]
[<CommonParameters>]
Identity
Get-UserPhoto [[-Identity] <MailboxIdParameter>]
[-Credential <PSCredential>]
[-DomainController <Fqdn>]
[-Filter <String>]
[-GroupMailbox]
[-IgnoreDefaultScope]
[-OrganizationalUnit <OrganizationalUnitIdParameter>]
[-PhotoType <String>]
[-Preview]
[-ReadFromDomainController]
[-ResultSize <Unlimited>]
[-SortBy <String>]
[<CommonParameters>]
Parameters (13)
Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.