启用PowerShell Web Access

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

  如果用户未退出,连接将在20分钟后自动断开。每次只能连接一台远程计算机,在多个选项卡中无法打开PowerShell Web Access。


1.Install-WindowsFeature WindowsPowerShellWebAccess -IncludeManagementTools

2.Install-PswawebApplication -UseTestCertificate #创建一个自签名证书,该证书有效期为90天

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

4.通过 https://IPaddress/pswa 进行访问

参考:http://technet.microsoft.com/library/hh831611.aspx

posted on 2014-06-10 09:54  momingliu11  阅读(1383)  评论(0编辑  收藏  举报