Exchange でユーザーのメールボックス データベースを見つける方法を探していましたが、powershell スクリプト以外は見つかりませんでした。機能すると思われる自動検出サービスを見つけましたが、期待していた応答が得られません。
try
{
AutodiscoverService autodiscoverService = new AutodiscoverService("mynetwork.ext",ExchangeVersion.Exchange2010);
autodiscoverService.Credentials = new NetworkCredential("Administrator@mynetwork.ext", "mypassword");
// Get the user settings.
// Submit a request and get the settings. The response contains only the
// settings that are requested, if they exist.
GetUserSettingsResponse autoResponse = autodiscoverService.GetUserSettings(
"testuser@theusersdomain.com",
UserSettingName.UserDN,
UserSettingName.MailboxDN
);
}
MS のドキュメントによると、"MailboxDN" はメールボックスの識別名であると想定されています。 http://msdn.microsoft.com/en-us/library/exchange/dd633650(v=exchg.80).aspx - "MailboxDN - ユーザーのメールボックスのメールボックス データベースの識別名。"
ただし、応答から得られるのは、「{[MailboxDN, /o=MyMail/ou=Exchange 管理グループ /(EYDIBOHF23SPDLT)/cn=Configuration/cn=Servers/cn=EXCHANGESERVER/cn=Microsoft Private MDB]}」です。
ユーザーがいる実際のメッセージ データベースは「test1」です。
この情報を取得する方法を知っている人はいますか?
ありがとう!