標籤:powershell 工作群組
一.實驗環境
650) this.width=650;" title="image" style="border-top:0px;border-right:0px;border-bottom:0px;border-left:0px;" border="0" alt="image" src="http://img1.51cto.com/attachment/201409/1/907015_1409562964rvPc.png" height="108" />
二.操作步驟
(1)在server端輸入“Enable-PSRometing”,啟用遠端連線;(具體操作參考:http://281816327.blog.51cto.com/907015/1397239)
(2)在client端輸入set-item wsman:\localhost\client\trustehosts –value “192.168.11.53”,將server設定為client的信任主機。
650) this.width=650;" title="image" style="border-top:0px;border-right:0px;border-bottom:0px;border-left:0px;" border="0" alt="image" src="http://img1.51cto.com/attachment/201409/1/907015_1409562965c8vv.png" height="77" />
以避免一下的錯誤;
(
錯誤內容為Enter-PSSession : 串連到遠程伺服器 192.168.11.53 失敗,並顯示以下錯誤訊息: WinRM 用戶端無法處理該請求。
身分識別驗證。 有關如何設定 TrustedHosts 的詳細資料,請運行以下命令: winrm help config。 有關詳細資料,請參 所在位置 行:1 字元: 1
+ Enter-PSSession -ComputerName 192.168.11.53 -Credential contoso.test\administrat ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (192.168.11.53:String) [Enter-PSSession],PSRemotingTran + FullyQualifiedErrorId : CreateRemoteRunspaceFailed
)
650) this.width=650;" title="image" style="border-top:0px;border-right:0px;border-bottom:0px;border-left:0px;" border="0" alt="image" src="http://img1.51cto.com/attachment/201409/1/907015_1409562965zCAv.png" height="71" />
(3)輸入“enter-pssession –computername 192.168.11.53 –credentrial contoso.test\administrator”,輸入密碼後即可遠程登入server;(具體操作參考:http://281816327.blog.51cto.com/907015/1397239)
附註:
(1)信任主機可以設定為一個網段,例如192.168.11.*
(2)或者一個網域名稱,例如iis01.contoso.test
本文出自 “緣隨心愿” 部落格,請務必保留此出處http://281816327.blog.51cto.com/907015/1547537
PowerShell遠端管理Windows Server(3):工作群組環境