MyITGuy
9/18/2017 - 6:26 PM

PowerShell: Exchange Active Directory query by recipient type

PowerShell: Exchange Active Directory query by recipient type

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)"
Get-ADObject -Filter "objectCategory -eq 'person' -and objectClass -eq 'user' -and msExchRecipientDisplayType -bor 0 -and msExchRecipientTypeDetails -bor 4"

Get-QADObject * -LdapFilter "(objectCategory=person)(objectClass=user)(msExchRecipientDisplayType:1.2.840.113556.1.4.804:=0)(msExchRecipientTypeDetails:1.2.840.113556.1.4.804:=4)"
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)"
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)"