在Windows Server 2012 出现之前好多运维人员为了通过web方便运用powershell管理服务器不得不借用第三方软件或者直接放弃这种想法,现在出现了一个全新的管理方式PSWA(Powershell Web Access),通过这种方式可以直接通过浏览器管理你的所有windows服务器。

今天主要是想大家介绍一下这个功能和安装配置方法。

一 为了提起大家的兴趣首先咱们先预览一下最终的效果:

这是登录的整个效果,大家可以看到跟正常桌面运行powershell差不多,只不过输入区域被单独划分出来了。

Powershell进阶学习(6) 部署 Windows PowerShell Web 访问

那么我们可以通过这种方式做哪些工作?

1查看本地服务器信息

Powershell进阶学习(6) 部署 Windows PowerShell Web 访问


2 通过session进行远程管理操作

Powershell进阶学习(6) 部署 Windows PowerShell Web 访问

现在感觉功能是不是很强大的?

二 下面我们介绍一下应用场景和安装过程:

应用场景:下面是一个微软官方提供的应用场景。PSWA服务器做为整个windows服务器区域的网关,通过一些加密和授权方式保证安全访问。

Powershell进阶学习(6) 部署 Windows PowerShell Web 访问

相关组件:

Windows PowerShell Web 访问 要求在你想运行网关的服务器上运行 Web 服务器 (IIS)、.NET Framework 4.5 和 Windows PowerShell 3.0

安装过程:

第一步:安装Windows PowerShell Web访问工具,这个过程不需要重启计算机。

Powershell进阶学习(6) 部署 Windows PowerShell Web 访问

第二步 查看一些相关的cmdlet

Powershell进阶学习(6) 部署 Windows PowerShell Web 访问

第三步:创建一个PSWA相关的web应用程序,并绑定一个自签发证书。

Powershell进阶学习(6) 部署 Windows PowerShell Web 访问


第四步:设置相关访问规则,这条规则允许一个用户和所有计算机访问所有配置:

Powershell进阶学习(6) 部署 Windows PowerShell Web 访问

第五步:访问页面和登录:

https://manageserver.contoso.com/pswa

Powershell进阶学习(6) 部署 Windows PowerShell Web 访问

Powershell进阶学习(6) 部署 Windows PowerShell Web 访问


我们不想使用自签发证书怎么办?这时候就需要向自建的证书颁发中心申请证书了。

第六步:申请证书过程。省略了证书颁发中心安装和证书管理控制台添加过程

Powershell进阶学习(6) 部署 Windows PowerShell Web 访问

Powershell进阶学习(6) 部署 Windows PowerShell Web 访问

Powershell进阶学习(6) 部署 Windows PowerShell Web 访问

Powershell进阶学习(6) 部署 Windows PowerShell Web 访问

Powershell进阶学习(6) 部署 Windows PowerShell Web 访问

Powershell进阶学习(6) 部署 Windows PowerShell Web 访问

Powershell进阶学习(6) 部署 Windows PowerShell Web 访问

Powershell进阶学习(6) 部署 Windows PowerShell Web 访问

Powershell进阶学习(6) 部署 Windows PowerShell Web 访问

Powershell进阶学习(6) 部署 Windows PowerShell Web 访问

Powershell进阶学习(6) 部署 Windows PowerShell Web 访问

Powershell进阶学习(6) 部署 Windows PowerShell Web 访问

Powershell进阶学习(6) 部署 Windows PowerShell Web 访问

Powershell进阶学习(6) 部署 Windows PowerShell Web 访问

Powershell进阶学习(6) 部署 Windows PowerShell Web 访问

Powershell进阶学习(6) 部署 Windows PowerShell Web 访问

Powershell进阶学习(6) 部署 Windows PowerShell Web 访问