?
Solved

o365 powershell question -  need assistance removing photos

Posted on 2014-12-02
2
Medium Priority
?
316 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 2000 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

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

If you troubleshoot Outlook for clients, you may want to know a bit more about the OST file before doing your next job. IMAP can cause a lot of drama if removed in the accounts without backing up.
In the absence of a fully-fledged GPO Management product like AGPM, the script in this article will provide you with a simple way to watch the domain (or a select OU) for GPOs changes and automatically take backups when policies are added, removed o…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Suggested Courses
Course of the Month9 days, 14 hours left to enroll

762 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