Exchange2013已经可以下载RTM版本,而从Exchange 2010开始已经支持PowerShell远程管理了,我们不再需要在本机安装Exchange管理工具,就可以通过使用PowerShell来远程管理Exchange服务器,以下以使用Basic身份认证去远程管理PowerShell为例:

方法1、
服务器端设置启用PowerShell目录的基本身份认证:
1. 登录任何一台Exchange 2013服务器。
2. 对一台需要连接的前端服务器上,对/Powershell虚拟目录添加新的验证方式(Basic身份认证): Get-PowerShellVirtualDirectory -Server e15rtmfe01 | Set-PowerShellVirtualDirectory -BasicAuthentication:$true
客户端计算机设置:
1. 在计算机上安装PowerShell 3.0 ,下载地址:
http://www.microsoft.com/en-us/download/details.aspx?id=34595
2. 在计算机上启用 Powershell的远程管理功能 ,以管理员身份运行PowerShell执行命令: Enable-PSRemoting -Force
3. 允许未加密通讯
a. 以管理员方式进入Powershell
b. cd WSMan:\localhost\client
c.  Set-item .\AllowUnencrypted $true -force
d. Set-item .\TrustedHosts -value * -force
e. Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
4. 运行$session=New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://mail.contoso.com/powershell -Authentication Basic -Credential (Get-Credential)
这样可以使用指定帐户连接服务器。
5. 使用命令导入会话:Import-PSSession $session
6. 如果想要结束会话,可以使用如下命令:
  Remove-PSSession $session  如果关闭 Windows PowerShell 窗口,而不执行此步骤,则会话必然超时,并且最大并发连接数的配额可能及时阻止您连接回该服务。

方法2、

1、在本地计算机上,打开 Windows PowerShell 并运行以下命令。

$UserCredential = Get-Credential
在“Windows PowerShell 凭据请求”窗口中,键入您的 Exchange 用户名和密码,然后单击“确定”。

2、运行以下命令。您需要指定 Exchange 2013 客户端访问服务器的 FQDN。

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://<FQDN of Exchange 2013 Client Access server>/PowerShell/ -Authentication Kerberos -Credential $UserCredential

有时候会出现使用mail.xxx.com连接不了而fqdn可以连接的时候,我们可以尝试使用如下的连接方式

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://mail.xxx.com/PowerShell/ -Authentication basic -Credential $UserCredential

3、运行以下命令。

Import-PSSession $Session
确保在完成后断开与远程 PowerShell 会话的连接。如果您没有断开会话就关闭了 Windows PowerShell 窗口,可能会用完您可用的所有远程 PowerShell 会话,并且将需要等待会话过期。要断开远程 PowerShell 会话,请运行以下命令。

Remove-PSSession $Session

也可以参考 Powershell管理系列(二十三)PowerShell操作之使用密文密码创建邮箱及连接powershell


http://blog.51cto.com/yuntcloud/1614363