Last active
September 18, 2017 18:52
-
-
Save MyITGuy/e2241b1ef476b3a1ebd358e6b84b0c0c to your computer and use it in GitHub Desktop.
PowerShell: Exchange Active Directory query by recipient type
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-ADObject -Filter "objectCategory -eq 'person' -and objectClass -eq 'user' -and msExchRecipientDisplayType -bor 8 -and msExchRecipientTypeDetails -bor 32" | |
Get-QADObject * -LdapFilter "(objectCategory=person)(objectClass=user)(msExchRecipientDisplayType:1.2.840.113556.1.4.804:=8)(msExchRecipientTypeDetails:1.2.840.113556.1.4.804:=32)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-ADObject -Filter "objectCategory -eq 'person' -and objectClass -eq 'user' -and msExchRecipientDisplayType -bor 7 -and msExchRecipientTypeDetails -bor 16" | |
Get-QADObject * -LdapFilter "(objectCategory=person)(objectClass=user)(msExchRecipientDisplayType:1.2.840.113556.1.4.804:=7)(msExchRecipientTypeDetails:1.2.840.113556.1.4.804:=16)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-ADObject -Filter "objectCategory -eq 'person' -and objectClass -eq 'user' -and msExchRecipientDisplayType -bor 1073741824 -and msExchRecipientTypeDetails -bor 1" | |
Get-QADObject * -LdapFilter "(objectCategory=person)(objectClass=user)(msExchRecipientDisplayType:1.2.840.113556.1.4.804:=1073741824)(msExchRecipientTypeDetails:1.2.840.113556.1.4.804:=1)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment