Solved

powershell FIND ALL objects in showinaddressbook value

Posted on 2014-07-24
4
860 Views
Last Modified: 2014-08-21
I am doing AD /Exchange clean up and was wondering if anyone have a way of finding objects that have a certain value in the showinaddressbook value. It would be difficult to do this by manually going in with ADSIEDIT. Is there a powershell command perhaps that can find different names in the showinaddressbook value. For example

CN=AG LA BC DDE
0
Comment
Question by:techdrive
  • 2
  • 2
4 Comments
 
LVL 40

Expert Comment

by:Subsun
Comment Utility
For exchange 2010 and above you can try..
Import-Module Activedirectory
Get-ADObject -Filter * -Properties showInAddressBook | ?{$_.showInAddressBook -match "CN=AG LA BC DDE"}

Open in new window

0
 

Author Comment

by:techdrive
Comment Utility
thanks works like a charm
0
 
LVL 40

Accepted Solution

by:
Subsun earned 500 total points
Comment Utility
Thanks!.. Please close the question.. :-)
0
 

Author Closing Comment

by:techdrive
Comment Utility
thanks
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Utilizing an array to gracefully append to a list of EmailAddresses
Microsoft Windows Server Update Service (WSUS) is free for everyone, but it lacks of some desirable features like send an e-mail to the administrator with the status of all computers on the WSUS server. This article is based on my PowerShell script …
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

744 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

18 Experts available now in Live!

Get 1:1 Help Now