{"action":"opened","issue":{"url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/3661","repository_url":"https://api.github.com/repos/Microsoft/vsts-tasks","labels_url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/3661/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/3661/comments","events_url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/3661/events","html_url":"https://github.com/Microsoft/vsts-tasks/issues/3661","id":209069450,"number":3661,"title":"Run powershell script on Azure VM failed","user":{"login":"acosmici","id":24937249,"avatar_url":"https://avatars.githubusercontent.com/u/24937249?v=3","gravatar_id":"","url":"https://api.github.com/users/acosmici","html_url":"https://github.com/acosmici","followers_url":"https://api.github.com/users/acosmici/followers","following_url":"https://api.github.com/users/acosmici/following{/other_user}","gists_url":"https://api.github.com/users/acosmici/gists{/gist_id}","starred_url":"https://api.github.com/users/acosmici/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acosmici/subscriptions","organizations_url":"https://api.github.com/users/acosmici/orgs","repos_url":"https://api.github.com/users/acosmici/repos","events_url":"https://api.github.com/users/acosmici/events{/privacy}","received_events_url":"https://api.github.com/users/acosmici/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-02-21T08:08:13Z","updated_at":"2017-02-21T08:08:13Z","closed_at":null,"body":"Hello guys,\r\n\r\nI am encountering an error when trying to run a powershell script on Azure VM;\r\n\r\n##[error]System.Management.Automation.RuntimeException: The running command stopped because the preference variable \"ErrorActionPreference\" or common parameter is set to Stop: C:\\inetpub\\wwwroot\\AzureSitecore\\Website\\Unicorn\\Feature\\Identity\\SERIAL~1 - The directory is not empty. ---> System.Management.Automation.RuntimeException: The running command stopped because the preference variable \"ErrorActionPreference\" or common parameter is set to Stop: C:\\inetpub\\wwwroot\\AzureSitecore\\Website\\Unicorn\\Feature\\Identity\\SERIAL~1 - The directory is not empty.\r\n\r\nPlease note that this script is running without any issue when is started from that VM but from VSTS I am getting that error random, so in my case the success rate is 50% when running.\r\nHow can I solve this issue?\r\n\r\nKind Regards,\r\nAdrian Cosmici"}}
{"actor":{"display_login":"acosmici"}}