首页 文章

通过HTTPS连接来自powershell远程处理的Exchange服务器EMS

提问于
浏览
0

我正在努力解决我们面临的问题 .

我们能够通过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 $ credentials -UseSSL

这很有效 .

现在,当我在New-PSSession / Enter-PSSession中使用-UseSSL for EMS时,它不起作用:

$newSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://test.domain.com/PowerShell/ -Credential $Credentials -UseSSL

错误:New-PSSession:无法使用指定的命名参数解析参数集 .

Please note: I need WinRM (powershell) Connectivity through HTTPS: -UseSSL Authentication. Not with Kerberos/Defaut/CredSSP

1 回答

  • 0

    您需要查看文档_854242中的参数集,例如,当您使用URI时

    参数集:Uri New-PSSession [-ConnectionUri] [-AllowRedirection] [-Authentication {Default |基本|谈判| NegotiateWithImplicitCredential | Credssp |摘要| Kerberos}] [-CertificateThumbprint] [-ConfigurationName] [-Credential] [-EnableNetworkAccess] [-Name] [-SessionOption] [-ThrottleLimit] []

    你应该做的是指定https前缀而不是使用-useSSL开关,这将确保连接通过https(“https://test.domain.com/PowerShell/);.- useSSL意味着在使用-ComputerName参数时使用 .

相关问题