Solved

How do i remove a picture from Active Directory?

Posted on 2011-02-22
8
11,221 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
Is Your AD Toolbox Looking More Like a Toybox?

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.

 
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

This article explains in simple steps how to renew expiring Exchange Server Internal Transport Certificate.
Learn to move / copy / export exchange contacts to iPhone without using any software. Also see the issues in configuration of exchange with iPhone to migrate contacts.
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…
This video discusses moving either the default database or any database to a new volume.

932 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now