Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1218
  • Last Modified:

powershell FIND ALL objects in showinaddressbook value

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
techdrive
Asked:
techdrive
  • 2
  • 2
1 Solution
 
SubsunCommented:
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
 
techdriveAuthor Commented:
thanks works like a charm
0
 
SubsunCommented:
Thanks!.. Please close the question.. :-)
0
 
techdriveAuthor Commented:
thanks
0

Featured Post

Evaluating UTMs? Here's what you need to know!

Evaluating a UTM appliance and vendor can prove to be an overwhelming exercise.  How can you make sure that you're getting the security that your organization needs without breaking the bank? Check out our UTM Buyer's Guide for more information on what you should be looking for!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now