$dataobject | Add-Member-NotePropertyName PhotoEnabled -NotePropertyValue "Yes" $dataobject | Add-Member-NotePropertyName PhotoEnabled -NotePropertyValue "No" $photo = get-UserPhoto $mbx.userprincipalname $dataobject | add-member-NotePropertyName UserPrincipalName -NotePropertyValue $mbx.userprincipalname $mailboxes = get-mailbox -ResultSize unlimited You can also download the script from Github.Ĭlick here for the downloadable link. You can see this with the property PhotoEnabled. If you do not get a photo back, and therefore an error message, the user does not yet have a photo in Office 365.įinally, in $data you have all users, whether or not they have a profile photo. The script first retrieves all mailboxes in Exchange, and then executes a foreach loop for each mailbox. So maybe you can make some improvements in the script, but for now it does work. ![]() ![]() ![]() If you are out of luck then time out your session. I tested the script with 4,000 users, and then the script takes quite a long time. See the profile picture in O365 with PowerShell. ADFS Android Android Studio Answers Automation Azure AzureAD Azure Storage Bluetooth Certificates Chrome CMD Disqus Excel Exchange Hyper-V IE IIS Intel Microsoft Office My Way NPS O365 OMS Outlook PowerBI PowerShell Printer PSScript Razer RDS Regedit S4B Samsung Settings Teams VirtualBox VSC WAP Windows Defender Windows Store Windows Updates WP Plugins WP Settings WSUS
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |