ws2012r2-logo5315_powershell-logo_gif-550x0_thumb

        Windows PowerShell Web Access(PSWA)是 Windows Server 2012 中的新功能,充当 Windows PowerShell 网关,允许远程计算机基于 Web 方式(HTTPS)访问和操作目标计算机的 Windows PowerShell,以执行 PowerShell 命令和脚本,而且无需在客户端上安装 PowerShell、远程管理软件或浏览器插件。其角色有些像 Remote Desktop Gateway,且允许单机应用,并且支持工作组环境。

image_thumb3

        PowerShell Web Access 基于 Web 方式访问的,只要支持 JavaScript 和接受 Cookies 的浏览器基本都可访问操作。下面是整理出的一组浏览器兼容性测试的结果数据,参考微软官方。

        受支持的台式计算机浏览器:

  • IE 8、9、10、11  
  • Firefox 10.0.2  
  • Chrome 17.0.963.56m  
  • Safari  5.1.2

        经过最小限度测试的移动设备或浏览器

  • Windows Phone 7、7.5、8  
  • Google Android WebKit 3.1 Browser Android 2.2.1 (Kernel 2.6)  
  • iPhone 5.0.1 的 Safari  
  • iPad 2 5.0.1 的 Safari

        为工作组环境下的 Windows Server 2012 安装和配置 PowerShell Web Access 可参考下列步骤:

        首先,通过“服务器管理器”的“添加角色和功能”向导安装“Windows PowerShell Web 访问”。使用 PowerShell 命令行安装:“Install-WindowsFeature WindowsPowerShellWebAccess -IncludeManagementTools

image_thumb4

        然后,在 PowerShell cmdlet 下执行“Install-PswawebApplication”,以在 IIS 下创建其所需的 Web 应用程序。

image_thumb5

        注:前面提到 PowerShell Web Access 基于 Web 方式访问,并且使用的是 HTTPS 协议,所以需要为其准备一张证书,否则我们可以通过附加“-UseTestCertificate”创建一个自签名证书,该证书有效期为90天。

image_thumb6

        如果准备有其他证书,可通过 IIS 管理器对 Web 站点的绑定进行设置。

        接下来,需要使用“Add-PswaAuthorizationRule”为 PowerShell Web Access 配置授权规则。例如:

Add-PswaAuthorizationRule –ComputerName * –UserName “maytidesufan” –Configuration *

        其中“-ComputerName”是要授权通过 PowerShell Web Access 访问的计算机名称,也可使用“ComputerGroupName”指定一个计算机组;“-UserName”即允许访问的用户,而“UserGroupName”为用户组;“-Configuration”即允许的会话配置

        现在,我们便可打开浏览器访问 PowerShell Web Access,进行计算机管理。

image_thumb7

image_thumb8

参考资料:“部署 Windows PowerShell Web 访问”、“使用基于 Web 的 Windows PowerShell 控制台

Windows Server | 评论(0) | 引用(0) | 阅读(9179)
发表评论
昵称 [注册]
密码 游客无需密码
网址
电邮
打开HTML 打开UBB 打开表情 隐藏 记住我