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


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

一、安装powershell web access功能;

二、配置powershell web access;


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

一、安装powershell web access功能;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

(9)继续下一步;

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

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

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

(11)点击“安装”;

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

(12)等待安装完成;

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

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

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


二、配置powershell web access;

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

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

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

Add-PswaAuthorization –UserName vm01\snail -ComputerName vm01 –ConfigurationName *

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

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

(3)激活Powershell远程管理;

见文章:http://281816327.blog.51cto.com/907015/1394799


三、验证访问;

(1)在浏览器中输入"https://ip or computername/pswa",选择仍然继续;

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

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

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

(3)成功进入;

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


参考网址:

http://technet.microsoft.com/en-us/library/dn282394.aspx

http://technet.microsoft.com/en-US/library/hh918345.aspx

http://technet.microsoft.com/en-us/library/dn282395.aspx