Category Archives: Active Directory

Get samaccount/username out of Active Directory via PowerShell

Here is how to get a list of everyone’s username out of active directory.

Get-ADUser -Filter * | FT SamAccountName -A

Exchange 2010 Won’t Sync Mobile Device Mailbox For One User

Today I stumbled across some weird stuff where one individual account wasn’t able to synchronize on their iPhone/Droid. They would sign in and get an error saying the “Connection to the server was unavailable.

To fix this, simply follow the steps below! 🙂
Open Active Directory Users and Computers -> View > Advanced Features.
Find the user with the problems connecting, Right-Click -> Properties.
Click the Security tab -> Advanced and make sure that the check box for “Include inheritable permissions from this object’s parent” is checked.

Pulling Active Directory account info via alias email address

I have been working on a PHP project that interfaces with active directory through LDAP.  I noticed that some accounts weren’t being resolved via email address.  I thought, hmm this is strange…  After a few hours, I finally figured out that the issue was due to an alias email address.  By default, the “mail” attribute only has the main email address listed, so any alias addresses will not be searched upon lookup.

Solution?

Use this query to select an item from AD via its alias email address:

(proxyAddresses=smtp:[email protected])