2013-07-08 26 views
1

我想從使用PowerShell的客戶端計算機備份我的服務器。在powershell中測試WSMan

我想執行一個批處理文件在我的服務器上,但我無法與我的服務器建立連接。我搜索了很多,並試圖

Test-WSMan : The WinRM client cannot process the request. If the authentication scheme is different from Kerberos, or i 
f the client computer is not joined to a domain, then HTTPS transport must be used or the destination machine must be a 
dded to the TrustedHosts configuration setting. Use winrm.cmd to configure TrustedHosts. Note that computers in the Tru 
stedHosts list might not be authenticated. You can get more information about that by running the following command: wi 
nrm help config. 
At line:1 char:11 
+ Test-WsMan <<<< 182.50.121.100 -credential $cred -authentication default 
    + CategoryInfo   : InvalidOperation: (182.50.121.100:String) [Test-WSMan], InvalidOperationException 
    + FullyQualifiedErrorId : WsManError,Microsoft.WSMan.Management.TestWSManCommand 

任何一個可以告訴我,我怎麼能一步執行批處理文件的步驟

回答

2

你有沒有在「GPEDIT」添加您的主機名或IP ieGroup政策和啓用使用新的憑據?

如果您有遺漏的東西,請按照步驟操作。

http://www.ifunky.net/Blog/post/How-To-Enable-PowerShell-Remoting-(WinRM).aspx

http://blog.crayon.no/blogs/janegil/archive/2010/03/04/enable_2D00_and_2D00_configure_2D00_windows_2D00_powershell_2D00_remoting_2D00_using_2D00_group_2D00_policy.aspx

他們有上手的足夠信息。有時候,如果啓用了所有功能,那麼重啓遠程管理服務是一個好主意

+0

嘿,謝謝你的幫助。必須在服務器或客戶端機器上運行這些腳本 – rajansoft1

+0

基本上,您需要在兩臺機器上運行這些腳本,但是如果您看到某些寫入服務器的位置,則需要在客戶端計算機中鍵入客戶端,並且應該可以工作。我大部分時間都在做這個配置。 – Bravo11

+0

鏈接1中的腳本顯示此錯誤Enable-WSManCredSSP:無法綁定參數,因爲參數'force'被多次指定。要爲可以接受多個值的參數提供多個 值,請使用數組語法。例如,「參數值1,值2,值 e3」。 在行:1個字符:47 +啓用-WSManCredSSP -force -role服務器-force <<<< + CategoryInfo:InvalidArgument:(:) [啓用-WSManCredSSP],ParameterBindingException + FullyQualifiedErrorId:ParameterAlreadyBound,Microsoft.WSMan。 Management.EnableWSManCredSSPCommand – rajansoft1