当前位置:网站首页 > 更多 > 玩电脑 > 正文

[玩转系统] Windows Server 2012/2016:安装和配置 PowerShell Web 访问 (PSWA)

作者:精品下载站 日期:2024-12-14 07:16:59 浏览:16 分类:玩电脑

Windows Server 2012/2016:安装和配置 PowerShell Web 访问 (PSWA)


三星 Galaxy 和 iPhone 上的 PowerShell? PowerShell Web 访问是一项新的 Windows Server 功能。它提供了一个基于 Web 的 PowerShell 控制台。安装后,您可以从任何设备访问 PowerShell,甚至可以从 Samsung Galaxy 或 iPhone 访问。

设置过程分为三个步骤:

  1. 安装 PowerShell Web Access(及其子功能)
  2. 安装证书
  3. 配置访问规则

安装 PowerShell Web 访问

运行以下 One-Liner 在 Windows Server 2012 或 2016 上安装 PowerShell Web Access。

Install-Windowsfeature WindowsPowerShellWebaccess -IncludeManagementTools

[玩转系统] Windows Server 2012/2016:安装和配置 PowerShell Web 访问 (PSWA)

无需重新启动。我们可以继续前进。

安装证书

Install-PswaWebApplication -UseTestCertificate

[玩转系统] Windows Server 2012/2016:安装和配置 PowerShell Web 访问 (PSWA)

不要在真实环境中使用测试证书。按照我的系列 Active Directory Zertifikatsdienste (Teil 1-8) 中的说明,从您的证书颁发机构获取它。

配置访问规则

Add-PswaAuthorizationRule -UserName * -ComputerName * -ConfigurationName *

[玩转系统] Windows Server 2012/2016:安装和配置 PowerShell Web 访问 (PSWA)

* 表示从任何用户和计算机进行访问。在这篇文章中我保持简单。在真实环境中,我建议限制访问,仅允许值得信赖的用户访问 PowerShell Web 访问。

PowerShell Web 访问的实际应用

现在打开网络浏览器并输入

https://localhost/pswa 

[玩转系统] Windows Server 2012/2016:安装和配置 PowerShell Web 访问 (PSWA)

提供用户名、密码和计算机名称(PowerShell Web Access 可以充当其他主机的网关,因此您必须提供计算机名称)。对于远程访问,必须将 localhost 替换为计算机名或域名。就我而言,它是 server03。

[玩转系统] Windows Server 2012/2016:安装和配置 PowerShell Web 访问 (PSWA)

测试成功完成!

[玩转系统] Windows Server 2012/2016:安装和配置 PowerShell Web 访问 (PSWA)

现在是时候在您的 iPhone、Samsung Galaxy 或 Linux 工作站上测试功能了!

结论

多么棒的功能啊!从任何设备访问 PowerShell!有关远程访问 Windows 服务器的更多信息,请参阅我的文章

PowerShell 远程处理:如何连接到域和非域环境中的远程主机(受信任的主机)

PowerShell:使用 Start-Transcript 记录您的工作

您需要 登录账户 后才能发表评论

取消回复欢迎 发表评论:

关灯