새 파일을 복사하기 전에 원격 서버의 폴더를 지워야합니다.Powershell 원격 통해 프록시 호출
그래서 내 클라이언트의 스크립트는 다음이 포함 :이 프로그램을 실행할 때 나는 다음과 같은 오류
Invoke-Command -Computer $TargetServer -ScriptBlock { Remove-Item $ClearPath }
얻을 :이의 나의 이해는 내가 TechNet의이 고개를
Connecting to remote server failed with the following error message : The client cannot connect to the destination specified in the request. Verify that the service on the destination is running and is accepting requests
했다 서버가 프록시를 사용하는 경우 (인터넷에 연결하려고 시도 할 때), $ PSSessionOption 객체를 사용해야합니다.
$User = "group\tfs_service"
$Password = ConvertTo-SecureString -String "x" -AsPlainText -Force
$Credential = New-Object –TypeName System.Management.Automation.PSCredential –ArgumentList $User, $Password
$PSSessionOption = New-PSSessionOption -ProxyAccessType IEConfig -ProxyAuthentication Negotiate -ProxyCredential $Credential
를 이제 나는 다음과 같은 오류 얻을 스크립트를 실행할 때 : 내가 잘못거야 어디
Connecting to remote server failed with the following error message : The WinRM client cannot process the request. Setting proxy information is not valid when the HTTP transport is specified. Remove the proxy information or change the transport and try the request again
사람이 말해 주시겠습니까를 그래서 나는 다음이 먼저 실행되도록 내 스크립트를 변경 ?