参数-mailboxcredential的含义是什么?

我正在写有关Exchange PowerShell命令。

当我想要使用下面的cmdlet时,我必须插入参数-mailboxcredential

  • Test-OwaConnectivity
  • Test-OutlookWebServices
  • Test-ImapConnectivity
  • Test-PopConnectivity

在微软官方网站上写着:

MailboxCredential参数指定单个URLtesting的邮箱凭证。

我不知道为什么这个参数是必要的。 我插入了不正确的凭据,但是该命令已成功完成。 你能告诉我为什么这个参数是必要的吗?

示例(错误/不正确的凭证)

 [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. 

我不知道你为什么认为你的第一个命令是成功的。 它明确指出,结果是一个失败:

在这里输入图像说明

如果你运行:

 Test-WebServicesConnectivity -ClientAccessServer EXhub1 -MailboxCredential (Get-Credential blablabla)|Format-List * 

你会得到更多关于到底发生了什么的信息。

第二个请求,正如Mathias在下面的注释中所解释的,它试图创build一个名为extest_91ef41d34eef4的帐户来testing邮箱,除非您有权创build用户帐户,否则您不能这样做。