问题
Is there an API equivalent (like EWS) for the New-MailContact cmdlet, which would allow me to create an Exchange 2010 mail contact from an existing AD contact? I know that I could invoke a PSSession, but I need a solution that (i) works remote and (ii) does not require admin privileges, i. e. must be configurable via ACLs or roles.
回答1:
I'm pretty sure there's not. However, the New-MailContact commandlet is really only changing attributes on an AD object. Therefore you can use LDAP commands to make the same modifications to the AD object. This is a little bit unsafe because Microsoft may change how a mail contact is represented in the next version of Exchange and your code would have to change accordingly.
I think your best bet here would be to create a web service that accepts input on what you want to do. Then have the web service run New-MailContact.
来源:https://stackoverflow.com/questions/9017199/api-equivalent-for-new-mailcontact