通過PowerShell遠端連接配接到Windows
1、目标Windows配置
遠端連接配接到目标Windows伺服器,以管理者身份運作PowerShell,執行以下指令開啟服務
Enable-PSRemoting
然後一路确定。

開啟服務後,設定誰可以通過PowerShell連接配接到本伺服器,執行以下指令
我有幾張阿裡雲幸運券分享給你,用券購買或者更新阿裡雲相應産品會有特惠驚喜哦!把想要買的産品的幸運券都領走吧!快下手,馬上就要搶光了。
Set-Item wsman:\localhost\Client\Trustedhosts $ip
其中ip為本地的IP位址。如果你的IP位址不穩定,可執行
Set-Item wsman:\localhost\Client\Trustedhosts *
再執行以下指令
Test-WSMan $ip #本地或雲伺服器上
Test-WSMan localhost #雲伺服器上
這樣就在雲端設定成功了。
原文連結