天天看點

PowerShell遠端管理Windows Server(2):公網通路【web形式】

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

Powershell Web Access需要兩個步驟才能使用:

一、安裝powershell web access功能;

二、配置powershell web access;

隻要在伺服器上啟用powershell web access功能,即可通過浏覽器通路powershell,進而來遠端管理伺服器;

(1)在ServerManager中點選“Add roles and features”;

<a href="http://281816327.blog.51cto.com/attachment/201405/21/907015_1400655690pChh.png" target="_blank"></a>

(2)在說明頁面進行下一步;

<a href="http://281816327.blog.51cto.com/attachment/201405/21/907015_1400655691lIzh.png" target="_blank"></a>

(3)選擇安裝類型,繼續下一步;

<a href="http://281816327.blog.51cto.com/attachment/201405/21/907015_1400655694lzWz.png" target="_blank"></a>

(4)選擇需要安裝的伺服器,繼續下一步;

<a href="http://281816327.blog.51cto.com/attachment/201405/21/907015_1400655699l3g1.png" target="_blank"></a>

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

<a href="http://281816327.blog.51cto.com/attachment/201405/21/907015_1400655700aO9b.png" target="_blank"></a>

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

<a href="http://281816327.blog.51cto.com/attachment/201405/21/907015_1400655701xskX.png" target="_blank"></a>

(7)在彈出的對話框中,點選“Add features”;

(8)勾選後,繼續下一步;

<a href="http://281816327.blog.51cto.com/attachment/201405/21/907015_14006557049yTh.png" target="_blank"></a>

(9)繼續下一步;

<a href="http://281816327.blog.51cto.com/attachment/201405/21/907015_14006557052S5A.png" target="_blank"></a>

(10)保持預設,下一步;

<a href="http://281816327.blog.51cto.com/attachment/201405/21/907015_1400655707a7Eq.png" target="_blank"></a>

(11)點選“安裝”;

<a href="http://281816327.blog.51cto.com/attachment/201405/21/907015_1400655711tDYh.png" target="_blank"></a>

(12)等待安裝完成;

<a href="http://281816327.blog.51cto.com/attachment/201405/21/907015_1400655713xzXE.png" target="_blank"></a>

(13)點選“Close”完成安裝;

<a href="http://281816327.blog.51cto.com/attachment/201405/21/907015_14006557158WUS.png" target="_blank"></a>

(1)以管理者的身份運作Powershell,然後輸入“Install-PswaWebApplication -UseTestCertificate”

<a href="http://281816327.blog.51cto.com/attachment/201405/21/907015_1400655719AQjU.png" target="_blank"></a>

(2)輸入一條規則,指令為

1

<code>Add-PswaAuthorization</code> <code>–UserName vm01\snail -ComputerName vm01 –ConfigurationName *</code>

(根據自己的電腦名和使用者名輸入,使用者一定要有遠端管理的權限)

<a href="http://281816327.blog.51cto.com/attachment/201405/21/907015_1400655730HdE8.png" target="_blank"></a>

(3)激活Powershell遠端管理;

三、驗證通路;

<a href="http://281816327.blog.51cto.com/attachment/201405/21/907015_1400655730PEAj.png" target="_blank"></a>

(2)輸入規則中的電腦名和使用者名登入;

<a href="http://281816327.blog.51cto.com/attachment/201405/21/907015_1400655731DoBd.png" target="_blank"></a>

(3)成功進入;

<a href="http://281816327.blog.51cto.com/attachment/201405/21/907015_1400655732jnWC.png" target="_blank"></a>

本文轉自 bannerpei 51CTO部落格,原文連結:http://blog.51cto.com/281816327/1414739,如需轉載請自行聯系原作者

繼續閱讀