远程调用Exchange的power shell进行管理

来源:互联网 发布:椭圆拟合算法 编辑:程序博客网 时间:2024/06/05 00:08

先远程登陆exchange服务器的Windows Power sehll命令如下

Enter-PSSession -ComputerName 172.17.224.207 -Credential test\admin

然后再登陆成功的shell上执行一下命令进入到exchange Manage Shell中命令如下

$credential = Get-Credential;$session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUrihttp://mail2016.test.com/powershell  -Credential $credential;Import-PSSession $session

参数说明:

http://mail2016.test.com/powershell 为exchange(iis)默认站点shell登陆地址

172.17.224.207为远程登陆的服务器地址

原创粉丝点击