If we are talking about ActiveDirectory and Exchange CustomAttribute1-X. You have to refer to it by the Active Directory field name called extensionAttribute.
If you replace SamaccountName & Domain with your information you can try this search.
... | head 1 | eval SamAccountName="myid" | eval domain="mydomain" | ldapfilter domain=$domain$ search="(&(objectClass=user)(samAccountName=$SamAccountName$))" attrs="cn,displayName,extensionAttribute2" | table samAccountName cn displayName exten*
... View more