我写这篇文章是有关 Exchange powershell 命令的。
当我想使用以下 cmdlet 时,我必须插入参数-mailboxcredential
Test-OwaConnectivity
Test-OutlookWebServices
Test-ImapConnectivity
Test-PopConnectivity
在微软官方网站上是这么写的:
MailboxCredential 参数指定单个 URL 测试的邮箱凭据。
我不确定为什么需要这个参数。我输入了错误的凭据,但命令成功完成。你能告诉我为什么需要这个参数吗?
示例(错误/不正确的凭证)
[PS] C:\>Test-WebServicesConnectivity -ClientAccessServer EXhub1 -MailboxCredential (Get-Credential blablabla)
CasServer LocalSite Scenario Result Latency(MS) Error
--------- --------- -------- ------ ----------- -----
EXhub1 Default-Fi... GetFolder Failure [System.Net.WebExcept...
无参数:
[PS] C:\>Test-WebServicesConnectivity -ClientAccessServer EXhub1
WARNING: Test user 'extest_91ef41d34eef4' isn't accessible, so this cmdlet won't be able to test Client Access server
connectivity.
Could not find or sign in with user ********\extest_91ef41d34eef4. If this task is being run without credentials,
sign in as a Domain Administrator, and then run Scripts\new-TestCasConnectivityUser.ps1 to verify that the user exists
on Mailbox server EXHUB1.******
+ CategoryInfo : ObjectNotFound: (:) [Test-WebServicesConnectivity], CasHealthCouldN...edInfoException
+ FullyQualifiedErrorId : FB9A14B6,Microsoft.Exchange.Monitoring.TestWebServicesConnectivity
WARNING: No Client Access servers were tested.
答案1
我不知道你为什么认为你的第一个命令是成功的。它清楚地表明结果是失败:
如果你运行:
Test-WebServicesConnectivity -ClientAccessServer EXhub1 -MailboxCredential (Get-Credential blablabla)|Format-List *
您将获得有关正在发生的事情的更多信息。
对于第二个请求,正如 Mathias 在下面的评论中解释的那样,它试图创建一个名为extest_91ef41d34eef4
测试邮箱的帐户,除非您有创建用户帐户的权限,否则您无法执行此操作。