Solved

o365 powershell question -  need assistance removing photos

Posted on 2014-12-02
2
303 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

After hours on line I found a solution which pointed to the inherited Active Directory permissions . You have to give/allow permissions to the "Exchange trusted subsystem" for the user in the Active Directory...
Had a business requirement to store the mobile number in an environmental variable. This is just a quick article on how this was done.
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…
how to add IIS SMTP to handle application/Scanner relays into office 365.

690 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