天天看点

PowerShell远程管理Windows Server(2):公网访问【web形式】

*此文章只适合于windows server 2012版本以上;

Powershell Web Access需要两个步骤才能使用:

一、安装powershell web access功能;

二、配置powershell web access;

只要在服务器上启用powershell web access功能,即可通过浏览器访问powershell,进而来远程管理服务器;

(1)在ServerManager中点击“Add roles and features”;

<a href="http://281816327.blog.51cto.com/attachment/201405/21/907015_1400655690pChh.png" target="_blank"></a>

(2)在说明页面进行下一步;

<a href="http://281816327.blog.51cto.com/attachment/201405/21/907015_1400655691lIzh.png" target="_blank"></a>

(3)选择安装类型,继续下一步;

<a href="http://281816327.blog.51cto.com/attachment/201405/21/907015_1400655694lzWz.png" target="_blank"></a>

(4)选择需要安装的服务器,继续下一步;

<a href="http://281816327.blog.51cto.com/attachment/201405/21/907015_1400655699l3g1.png" target="_blank"></a>

(5)在服务器角色界面,不能勾选任何一个角色,直接下一步即可;

<a href="http://281816327.blog.51cto.com/attachment/201405/21/907015_1400655700aO9b.png" target="_blank"></a>

(6)在功能界面勾选“Powershell web access”;

<a href="http://281816327.blog.51cto.com/attachment/201405/21/907015_1400655701xskX.png" target="_blank"></a>

(7)在弹出的对话框中,点击“Add features”;

(8)勾选后,继续下一步;

<a href="http://281816327.blog.51cto.com/attachment/201405/21/907015_14006557049yTh.png" target="_blank"></a>

(9)继续下一步;

<a href="http://281816327.blog.51cto.com/attachment/201405/21/907015_14006557052S5A.png" target="_blank"></a>

(10)保持默认,下一步;

<a href="http://281816327.blog.51cto.com/attachment/201405/21/907015_1400655707a7Eq.png" target="_blank"></a>

(11)点击“安装”;

<a href="http://281816327.blog.51cto.com/attachment/201405/21/907015_1400655711tDYh.png" target="_blank"></a>

(12)等待安装完成;

<a href="http://281816327.blog.51cto.com/attachment/201405/21/907015_1400655713xzXE.png" target="_blank"></a>

(13)点击“Close”完成安装;

<a href="http://281816327.blog.51cto.com/attachment/201405/21/907015_14006557158WUS.png" target="_blank"></a>

(1)以管理员的身份运行Powershell,然后输入“Install-PswaWebApplication -UseTestCertificate”

<a href="http://281816327.blog.51cto.com/attachment/201405/21/907015_1400655719AQjU.png" target="_blank"></a>

(2)输入一条规则,命令为

1

<code>Add-PswaAuthorization</code> <code>–UserName vm01\snail -ComputerName vm01 –ConfigurationName *</code>

(根据自己的电脑名和用户名输入,用户一定要有远程管理的权限)

<a href="http://281816327.blog.51cto.com/attachment/201405/21/907015_1400655730HdE8.png" target="_blank"></a>

(3)激活Powershell远程管理;

三、验证访问;

<a href="http://281816327.blog.51cto.com/attachment/201405/21/907015_1400655730PEAj.png" target="_blank"></a>

(2)输入规则中的电脑名和用户名登录;

<a href="http://281816327.blog.51cto.com/attachment/201405/21/907015_1400655731DoBd.png" target="_blank"></a>

(3)成功进入;

<a href="http://281816327.blog.51cto.com/attachment/201405/21/907015_1400655732jnWC.png" target="_blank"></a>

本文转自 bannerpei 51CTO博客,原文链接:http://blog.51cto.com/281816327/1414739,如需转载请自行联系原作者

继续阅读