开发者

Powershell exchange server

开发者 https://www.devze.com 2023-03-20 02:52 出处:网络
I am trying to connect \"Exchange Server 2007\" from a remote machine using windows powershell. This is how I do.

I am trying to connect "Exchange Server 2007" from a remote machine using windows powershell. This is how I do.

$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 }

but when I run this query I am getting an error like this

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

The credential I used here is my system credential.


Do you take care of this documentation information.

"To use an IP address in the value of the ComputerName parameter, the command must include the Credential parameter. Also, the computer must be configured for HTTPS transport or the IP address of the remote computer must be included in the WinRM TrustedHosts list on the local computer. For instructions for adding a computer name to the TrustedHosts list, see "How to Add a Computer to the Trusted Host List" in about_Remote_Troubleshooting."

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号