我試圖解決我們正面臨的問題。通過HTTPS從PowerShell遠程連接連接Exchange服務器
我們能夠通過winRM HTTP身份驗證從遠程計算機與Exchange Server EMS腳本進行通信。
$newSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://test.domain.com/PowerShell/ -Authentication Kerberos -Credential $Credentials
Import-PSSession $newSession
但我們必須實行WinRM的HTTPS,對於包括證書創建要求,所以我已經設置好一切,WinRM的設置等
,我們能夠連接到遠程計算機,其中交換服務器可用:
輸入-的PSSession -ComputerName test.domain.com -Credential $憑據-UseSSL
和工作原理。
現在,當我在新的PSSession使用-UseSSL /輸入-的PSSession的EMS,它不工作:
$newSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://test.domain.com/PowerShell/ -Credential $Credentials -UseSSL
Error: New-PSSession : Parameter set cannot be resolved using the specified named parameters.
請注意:我需要WinRM的(PowerShell中)連接通過HTTPS : - 使用SSL身份驗證。不使用Kerberos/Defaut/CredSSP的