Forum Discussion

Deleted's avatar
Deleted
May 10, 2018

Profile pictures in O365

HI there,

 

I have users with and some without profile pictures in O365 - please assist with a script or tool to extract a list of users "without" profile pictures in O365?

 

Please,please

Thank you!

8 Replies

  • Hyperfish also has a free tool for doing just photos. Their entire profile package is a nice upgrade option as well.
    • Deleted's avatar
      Deleted

      HI Christopher,

       

      How safe and secure is it to use Hyperfish as a Global Admin in your O365 Tenant?

    • Deleted's avatar
      Deleted
      Good one to test for future use...Thank you!
    • Deleted's avatar
      Deleted

      HI Daniel,

       

      Another one - how do I add filter to output - DisplayName, UserPrincipalName, Department, LastLogonTime and haspicture -eq $false

       

      Thanks

      • Daniel Laskewitz's avatar
        Daniel Laskewitz
        Iron Contributor

        You can add properties to the select:

         

        $allUsers = Get-Mailbox -RecipientTypeDetails UserMailbox -ResultSize Unlimited | select UserPrincipalName, Alias, DisplayName, Department, LastLogonTime

         For the haspicture -eq $false you can add the else part of the if/else statement:

         

        If($photo.PictureData -ne $null) {
        [io.file]::WriteAllBytes($path,$photo.PictureData) Write-Host $user.Alias “profile picture downloaded” } Else { # Insert your logic here }

Resources