Solved

How do i remove a picture from Active Directory?

Posted on 2011-02-22
8
11,475 Views
Last Modified: 2015-07-28
Hi,

I have uploaded a whole load of photos to the GAL with reference to the following site:
http://msexchangeteam.com/archive/2010/03/10/454223.aspx

It all worked successfully and i used a command similar to this:
Import-RecipientDataProperty -Identity "Ivan Drrr" -Picture -FileData ([Byte[]]$(Get-Content -Path "C:\photos\ivand.jpg" -Encoding Byte -ReadCount 0))

Open in new window


Now i have a user who does not want to be on it, and i want to remove the photo from the GAL. Does anyone know how to do this?

Regards,
Ivan
0
Comment
Question by:blackmores
8 Comments
 
LVL 1

Author Comment

by:blackmores
ID: 34958139
To clarify the question so there is no missunderstanding:

I would like to remove a particular users photo from Active Directory so it is no longer stored in AD. Effectively delete the picture from AD so nothing will continue to use it once its propgated through OAB and so on.

Cheers,
ivan
0
 
LVL 17

Expert Comment

by:chuku
ID: 34958228
Check this: http://msexchangeteam.com/archive/2010/03/10/454223.aspx
Specifically:

To prevent Outlook cached mode clients from displaying thumbnail photos (remember, the photo is not in the OAB— just a pointer to go fetch it from AD), you can remove the thumbnailPhoto attribute from the ConfiguredAttributes property of an OAB using the following command:

$attributes = (Get-OfflineAddressBook "Default Offline Address Book").ConfiguredAttributes
$attributes.Remove("thumbnailphoto,Indicator")
Set-OfflineAddressBook "Default Offline Address Book" -ConfiguredAttributes $attributes
0
 
LVL 1

Accepted Solution

by:
blackmores earned 0 total points
ID: 34958426
After more searching and getting a better understanding of what i am actually doing, i discovered what the process was (that worked for me).
I have not looked at what else would work but i do assume this could be acomplished via powershell. Will give points for someone who submits the solution.

My solution was to delete ADSIEDIT and clear the properties of the thumbnailPhoto.
 screenshot of adsiedit thumbmailphoto
Cheers,
Ivan
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 1

Author Closing Comment

by:blackmores
ID: 34990910
noone else provided the correct answer
0
 

Expert Comment

by:ooharris
ID: 35213848
Using Powershell with AD module:

set-ADUser "username" -clear thumbnailphoto
0
 

Expert Comment

by:kingcastle
ID: 40506668
sorry to chip in again on this.

but i removed the profile picture from AD but a number of days later it still shows up when the user send an email to anyone on the GAL?

Any advice would be great.
0
 
LVL 1

Author Comment

by:blackmores
ID: 40508229
Hi Kingcastle,

I cannot tell you exactly what is causing that however I can think of  a couple of things for you to look at:

1. Have you forcefully generated a new GAL and downloaded it from the client?
2. Have you tried to use Online Mode where an offline GAL is not used. (this will eliminate the Offline Address Book being the problem)
3. Have you tried creating a new user and testing that user in Outlook (new profile)? This will tell you if it has something to do with the cache of the client machine?
4. Likewise try creating a new Mail Profile with the same account details, and see if the symptoms go away.
5. Check to see if the contact is in the personals Contacts list. Contacts can update its details automatically from AD, however pictures tend to not be overwritten. When it comes to displaying in Outlook the local image takes preference in my experience. If you remove the picture it should refresh and download a new one.

Give that all a go and let me know what the results are.

Cheers,
Ivan
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Following basic email etiquette rules will help you write a professional email and achieve a good, lasting impression with your contacts.
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
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 …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

808 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