{"action":"closed","issue":{"url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/2427","repository_url":"https://api.github.com/repos/Microsoft/vsts-tasks","labels_url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/2427/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/2427/comments","events_url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/2427/events","html_url":"https://github.com/Microsoft/vsts-tasks/issues/2427","id":175495899,"number":2427,"title":"Azure Copy Task Failed with Access is Denied","user":{"login":"boydc2014","id":3829387,"avatar_url":"https://avatars.githubusercontent.com/u/3829387?v=3","gravatar_id":"","url":"https://api.github.com/users/boydc2014","html_url":"https://github.com/boydc2014","followers_url":"https://api.github.com/users/boydc2014/followers","following_url":"https://api.github.com/users/boydc2014/following{/other_user}","gists_url":"https://api.github.com/users/boydc2014/gists{/gist_id}","starred_url":"https://api.github.com/users/boydc2014/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boydc2014/subscriptions","organizations_url":"https://api.github.com/users/boydc2014/orgs","repos_url":"https://api.github.com/users/boydc2014/repos","events_url":"https://api.github.com/users/boydc2014/events{/privacy}","received_events_url":"https://api.github.com/users/boydc2014/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Microsoft/vsts-tasks/labels/Area:%20RM","name":"Area: RM","color":"5319e7"}],"state":"closed","locked":false,"assignee":{"login":"kmkumaran","id":11780076,"avatar_url":"https://avatars.githubusercontent.com/u/11780076?v=3","gravatar_id":"","url":"https://api.github.com/users/kmkumaran","html_url":"https://github.com/kmkumaran","followers_url":"https://api.github.com/users/kmkumaran/followers","following_url":"https://api.github.com/users/kmkumaran/following{/other_user}","gists_url":"https://api.github.com/users/kmkumaran/gists{/gist_id}","starred_url":"https://api.github.com/users/kmkumaran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kmkumaran/subscriptions","organizations_url":"https://api.github.com/users/kmkumaran/orgs","repos_url":"https://api.github.com/users/kmkumaran/repos","events_url":"https://api.github.com/users/kmkumaran/events{/privacy}","received_events_url":"https://api.github.com/users/kmkumaran/received_events","type":"User","site_admin":false},"assignees":[{"login":"kmkumaran","id":11780076,"avatar_url":"https://avatars.githubusercontent.com/u/11780076?v=3","gravatar_id":"","url":"https://api.github.com/users/kmkumaran","html_url":"https://github.com/kmkumaran","followers_url":"https://api.github.com/users/kmkumaran/followers","following_url":"https://api.github.com/users/kmkumaran/following{/other_user}","gists_url":"https://api.github.com/users/kmkumaran/gists{/gist_id}","starred_url":"https://api.github.com/users/kmkumaran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kmkumaran/subscriptions","organizations_url":"https://api.github.com/users/kmkumaran/orgs","repos_url":"https://api.github.com/users/kmkumaran/repos","events_url":"https://api.github.com/users/kmkumaran/events{/privacy}","received_events_url":"https://api.github.com/users/kmkumaran/received_events","type":"User","site_admin":false},{"login":"pavanadepu2","id":16331028,"avatar_url":"https://avatars.githubusercontent.com/u/16331028?v=3","gravatar_id":"","url":"https://api.github.com/users/pavanadepu2","html_url":"https://github.com/pavanadepu2","followers_url":"https://api.github.com/users/pavanadepu2/followers","following_url":"https://api.github.com/users/pavanadepu2/following{/other_user}","gists_url":"https://api.github.com/users/pavanadepu2/gists{/gist_id}","starred_url":"https://api.github.com/users/pavanadepu2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pavanadepu2/subscriptions","organizations_url":"https://api.github.com/users/pavanadepu2/orgs","repos_url":"https://api.github.com/users/pavanadepu2/repos","events_url":"https://api.github.com/users/pavanadepu2/events{/privacy}","received_events_url":"https://api.github.com/users/pavanadepu2/received_events","type":"User","site_admin":false}],"milestone":null,"comments":7,"created_at":"2016-09-07T12:58:38Z","updated_at":"2016-09-09T18:15:59Z","closed_at":"2016-09-09T18:15:59Z","body":"My AzCopy task failed with **Access is Denied**:\r\n```\r\n2016-09-06T08:37:52.4872690Z` ##[section]Starting: AzureVMs File Copy\r\n \r\n.... \r\n2016-09-06T08:38:33.5108343Z ##[error]Connecting to remote server [xxxxxx].eastasia.cloudapp.azure.com failed with the following error message : Access is denied. For more information, see the about_Remote_Troubleshooting Help topic.To fix WinRM connection related issues, select the 'Enable Copy Prerequisites' option in the task. If set already, and the target Virtual Machines are backed by a Load balancer, ensure Inbound NAT rules are configured for target port (5986). Applicable only for ARM VMs. For more info please refer to https://aka.ms/azurefilecopyreadme\r\n ....\r\n2016-09-06T08:38:33.5577117Z ##[section]Finishing: AzureVMs File Copy\r\n```\r\nI've tried the following:\r\n\r\n* 1. check winrm is listening on HTTPS port\r\n* 2. make sure connection is not blocked by inbound rules by configure Firewall and NetworkSecurityGroup\r\n* 3. make sure \"Enable Copy Prerequisites\" and \"Test Certificate\" are checked following\r\nhttps://blogs.msdn.microsoft.com/muthus_blog/2016/03/24/simplifying-winrm-pre-requisites-in-azure-vms-as-part-of-release-and-build-workflows/\r\n* 4. make sure i have a self-signed certificate by following \r\nhttps://github.com/Microsoft/vsts-tasks/issues/1008 (.\\ConfigureWinRM.ps1 *.eastasia.cloudapp.azure.com)\r\n* 5. add my build agent to trustedHosts by setting trustedHost to \"*\"\r\n* 6. make sure remote UAC is closed by following \r\n https://support.microsoft.com/en-us/kb/951016#bookmark-diditfix\r\n\r\nWhen I run \r\n```\r\n$soptions = New-PSSessionOption -SkipCACheck\r\n$cred = Get-Credential\r\n$computername = 'my domain'\r\n$computerport = '5986'\r\nEnter-PSSession -ComputerName $computername -Port $computerport -Credential $cred -SessionOption $soptions -UseSSL\r\n```\r\n\r\nEnter-PSSession : Connecting to remote server *.eastasia.cloudapp.azure.com failed with the following error\r\nmessage : Access is denied. For more information, see the about_Remote_Troubleshooting Help topic.\r\nAt line:1 char:1\r\n+ Enter-PSSession -ComputerName $computername -Port $computerport -Credential $cre ...\r\n+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n    + CategoryInfo          : InvalidArgument: (kickoffbot.eastasia.cloudapp.azure.com:String) [Enter-PSSession], PSR\r\n   motingTransportException\r\n    + FullyQualifiedErrorId : CreateRemoteRunspaceFailed\r\n\r\n\r\nI have no idea what's next to try. \r\n\r\n\r\n"}}
{"actor":{"display_login":"pavanadepu2"}}