1

我想用PowerShell遠程連接到我的Exchange服務器。 Exchange服務器位於其自己的專用Exchange林中。我試圖在沒有Exchange服務器的林中打開連接。通過PowerShell遠程連接到交換服務器時出錯

這是我在我的PowerShell腳本:

$powershell_url = "http://exhange_server_url.com/PowerShell/" 
$session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri $powershell_url -Authentication Kerberos 

當我運行該腳本,我得到這個錯誤:

[exhange_server_url.com] Connecting to remote server failed with the following error message : The WinRM client cannot process the request. The authentication mechanism requested by the client is not supported by the server or unencrypted traffic is disabled in the service configuration. Verify the unencrypted traffic setting in the service configuration or specify one of the authentication mechanisms supported by the server. To use Kerberos, sp ecify the computer name as the remote destination. Also verify that the client computer and the destination computer ar e joined to a domain. To use Basic, specify the computer name as the remote destination, specify Basic authentication a nd provide user name and password. Possible authentication mechanisms reported by server: For more information, see the about_Remote_Troubleshooting Help topic. + CategoryInfo : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [], PSRemotingTransportExc eption + FullyQualifiedErrorId : PSSessionOpenFailed

請問該如何解決這個問題?

回答

0

這是我落得這樣做:

$credentials = new-object -typename System.Management.Automation.PSCredential -argumentlist "DOMAIN\Administrator","password" 
#connect with remote cas server 
$powershell_url = "http://cas-server/PowerShell/" 
$session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri $powershell_url -credential $credentials -Authentication Kerberos 
0

您確定您的帳戶已啓用遠程交換嗎?

下面是詳細信息的網站:Technet Article

+0

是,該賬戶進行遠程訪問功能。 –

相關問題