I have some User objects with "ExchangeActiveSyncDevices" object within. I also have some Computer objects with published printers inside.
So how can I look (with PowerShell) for such objects using some kind of unified approach? I mean without specific Exchange commandlets for AS devices and such. There must be a way to find objects with another object inside using some [ADSI] magic or such, right?
You can use the SearchBase of the parent Object to find Child Objects, for example:
Use could try the Get-ADObject cmdlet to search for objects in Active Directory and filter the results using the -Filter parameter. The filter should be in the LDAP query format and you can use the -Properties parameter to specify which properties of the object you want to retrieve. Probably like this: