Solved

o365 powershell question -  need assistance removing photos

Posted on 2014-12-02
2
275 Views
Last Modified: 2014-12-02
hello, can someone provide a powershell script that I can run against the Office 365 tenant account to use an input CSV and remove the photo from each user?

many thanks!

S.
0
Comment
Question by:siber1
2 Comments
 
LVL 24

Accepted Solution

by:
VB ITS earned 500 total points
ID: 40477657
Try this:
$csv = Import-Csv C:\Folder\userphotos.csv
ForEach ($line in $csv) {
   Remove-UserPhoto $line.email -confirm:$false
}

Open in new window

Then format your CSV file as below:

email
user1@company.com
user2@company.com
user3@company.com
etc.
0
 

Author Closing Comment

by:siber1
ID: 40477662
thanks much! worked great.
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This script can help you clean up your user profile database by comparing profiles to Active Directory users in a particular OU, and removing the profiles that don't match.
This article outlines the process to identify and resolve account lockout in an Active Directory environment.
This video discusses moving either the default database or any database to a new volume.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question