I'm trying to get the value of msExchRecipientTypeDetails
for a user using PowerShell and ADSI but I'm getting System.__ComObject
.
I'm not able to move forward on getting the exact string. I'm using below PowerShell command
$ADUsr = [ADSI]"LDAP://CN=User Name,OU=OrgUnit,DC=dc,DC=dc,DC=dc"
$ADUsr.msExchRecipientTypeDetails
And result are show below
PS C:\Windows\system32> $ADUsr.msExchRecipientTypeDetails
System.__ComObject
How Can I get the exact string value? I'm expecting to get "2147483648" for UserMailbox
Any help is appreciated!
I am able to see the value of this property if i use a directory searcher to retrieve the user object:
Or you can simply use the powershell cmdlet: