【问题标题】:Powershell exchange serverPowershell 交换服务器
【发布时间】:2011-10-04 05:33:08
【问题描述】:

我正在尝试使用 windows powershell 从远程计算机连接“Exchange Server 2007”。我就是这样做的。

$server = '192.168.1.61';
$pwd = convertto-securestring '123' -asplaintext -force;
$cred = new-object -typename System.Management.Automation.PSCredential -argumentlist 'isshyd\Administrator', $pwd;
invoke-command -computername $server -credential $cred -scriptblock { Add-PSSnapin Microsoft.Exchange.Management.PowerShell.Admin;Get-MailboxDatabase | ft Name }

但是当我运行这个查询时,我收到了这样的错误

Active Directory server "machine name" is not available.
The supplied credential is invalid.

我在这里使用的凭据是我的系统凭据。

【问题讨论】:

  • isshyd 是远程计算机名还是域名?
  • 如果您在远程计算机上本地尝试代码而不指定凭据会怎样?

标签: c# powershell powershell-2.0 exchange-server exchange-server-2007


【解决方案1】:

您是否妥善保管这些文档信息。

“要在 ComputerName 参数的值中使用 IP 地址,该命令必须包含 Credential 参数。此外,计算机必须配置为 HTTPS 传输或 IP 地址远程计算机必须包含在本地计算机的 WinRM TrustedHosts 列表中。有关将计算机名称添加到 TrustedHosts 列表的说明,请参阅 about_Remote_Troubleshooting 中的“如何将计算机添加到受信任的主机列表”。"

【讨论】:

  • 在 WinTM TrustedHosts 中,我给出了 *.这应该接受任何远程机器的权利。但它仍然无法正常工作。
  • 什么是 'isshyd' 远程计算机名或 netbios 域名?
猜你喜欢
  • 1970-01-01
  • 2015-10-19
  • 2017-02-03
  • 1970-01-01
  • 1970-01-01
  • 2013-05-24
  • 1970-01-01
  • 2020-11-18
相关资源
最近更新 更多