{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls/comments/62482513","id":62482513,"diff_hunk":"@@ -798,47 +814,48 @@ function Validate-CustomScriptExecutionStatus\n     param([string]$resourceGroupName,\n           [string]$vmName,\n           [string]$extensionName)\n-\t\t  \n+\n     Write-Verbose -Verbose \"Validating the winrm configuration custom script extension status\"\n \n     $isScriptExecutionPassed = $true\n     try\n     {\n         $status = Get-AzureMachineStatus -resourceGroupName $resourceGroupName -Name $vmName\n \n-    $customScriptExtension = $status.Extensions | Where-Object { ($_.ExtensionType -eq \"Microsoft.Compute.CustomScriptExtension\" -or $_.Type -eq \"Microsoft.Compute.CustomScriptExtension\") -and $_.Name -eq $extensionName }\n+        # For AzurePS < 1.0.4 $_.ExtensionType is applicable.\n+        $customScriptExtension = $status.Extensions | Where-Object { ($_.ExtensionType -eq \"Microsoft.Compute.CustomScriptExtension\" -or $_.Type -eq \"Microsoft.Compute.CustomScriptExtension\") -and $_.Name -eq $extensionName }\n \n-    if($customScriptExtension)\n-    {\n-        $subStatuses = $customScriptExtension.SubStatuses\n-        $subStatusesStr = $subStatuses | Out-String\n+        if($customScriptExtension)\n+        {\n+            $subStatuses = $customScriptExtension.SubStatuses\n+            $subStatusesStr = $subStatuses | Out-String\n \n-        Write-Verbose -Verbose \"Custom script extension execution statuses: $subStatusesStr\"\n+            Write-Verbose -Verbose \"Custom script extension execution statuses: $subStatusesStr\"\n \n-        if($subStatuses)\n-        {\n-            foreach($subStatus in $subStatuses)\n+            if($subStatuses)\n             {\n-                if($subStatus.Code.Contains(\"ComponentStatus/StdErr\") -and (-not [string]::IsNullOrEmpty($subStatus.Message)))\n+                foreach($subStatus in $subStatuses)\n                 {\n-                    $isScriptExecutionPassed = $false\n-                    $errMessage = $subStatus.Message","path":"Tasks/DeployAzureResourceGroup/Utility.ps1","position":529,"original_position":529,"commit_id":"74ac4458bce417bc265ddbb4a855dd4876c20f79","original_commit_id":"f02dabc8c58506c9b2b9a39a548b941c5d8a1a49","user":{"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},"body":"I don't see any change here.","created_at":"2016-05-09T11:13:07Z","updated_at":"2016-05-09T11:13:07Z","html_url":"https://github.com/Microsoft/vsts-tasks/pull/1646#discussion_r62482513","pull_request_url":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls/1646","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls/comments/62482513"},"html":{"href":"https://github.com/Microsoft/vsts-tasks/pull/1646#discussion_r62482513"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls/1646"}}},"pull_request":{"url":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls/1646","id":69115089,"html_url":"https://github.com/Microsoft/vsts-tasks/pull/1646","diff_url":"https://github.com/Microsoft/vsts-tasks/pull/1646.diff","patch_url":"https://github.com/Microsoft/vsts-tasks/pull/1646.patch","issue_url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/1646","number":1646,"state":"open","locked":false,"title":"orting Changes forDeployAzureRG Task [U3 important bug fixes]","user":{"login":"anaggar","id":16114399,"avatar_url":"https://avatars.githubusercontent.com/u/16114399?v=3","gravatar_id":"","url":"https://api.github.com/users/anaggar","html_url":"https://github.com/anaggar","followers_url":"https://api.github.com/users/anaggar/followers","following_url":"https://api.github.com/users/anaggar/following{/other_user}","gists_url":"https://api.github.com/users/anaggar/gists{/gist_id}","starred_url":"https://api.github.com/users/anaggar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anaggar/subscriptions","organizations_url":"https://api.github.com/users/anaggar/orgs","repos_url":"https://api.github.com/users/anaggar/repos","events_url":"https://api.github.com/users/anaggar/events{/privacy}","received_events_url":"https://api.github.com/users/anaggar/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-05-06T07:35:40Z","updated_at":"2016-05-09T11:13:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"11863b571f43faa8a5b0a6caa1b73e49efc7bab4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls/1646/commits","review_comments_url":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls/1646/comments","review_comment_url":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/1646/comments","statuses_url":"https://api.github.com/repos/Microsoft/vsts-tasks/statuses/74ac4458bce417bc265ddbb4a855dd4876c20f79","head":{"label":"Microsoft:users/anaggar/U3BugFixAzureDeployRG","ref":"users/anaggar/U3BugFixAzureDeployRG","sha":"74ac4458bce417bc265ddbb4a855dd4876c20f79","user":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":27631673,"name":"vsts-tasks","full_name":"Microsoft/vsts-tasks","owner":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/vsts-tasks","description":"Build and Release Tasks for Visual Studio Online and Team Foundation Server","fork":false,"url":"https://api.github.com/repos/Microsoft/vsts-tasks","forks_url":"https://api.github.com/repos/Microsoft/vsts-tasks/forks","keys_url":"https://api.github.com/repos/Microsoft/vsts-tasks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/vsts-tasks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/vsts-tasks/teams","hooks_url":"https://api.github.com/repos/Microsoft/vsts-tasks/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/vsts-tasks/events","assignees_url":"https://api.github.com/repos/Microsoft/vsts-tasks/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/vsts-tasks/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/vsts-tasks/tags","blobs_url":"https://api.github.com/repos/Microsoft/vsts-tasks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/vsts-tasks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/vsts-tasks/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/vsts-tasks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/vsts-tasks/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/vsts-tasks/languages","stargazers_url":"https://api.github.com/repos/Microsoft/vsts-tasks/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/vsts-tasks/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/vsts-tasks/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/vsts-tasks/subscription","commits_url":"https://api.github.com/repos/Microsoft/vsts-tasks/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/vsts-tasks/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/vsts-tasks/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/vsts-tasks/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/vsts-tasks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/vsts-tasks/merges","archive_url":"https://api.github.com/repos/Microsoft/vsts-tasks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/vsts-tasks/downloads","issues_url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/vsts-tasks/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/vsts-tasks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/vsts-tasks/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/vsts-tasks/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/vsts-tasks/deployments","created_at":"2014-12-06T11:11:46Z","updated_at":"2016-05-07T20:13:16Z","pushed_at":"2016-05-09T10:50:42Z","git_url":"git://github.com/Microsoft/vsts-tasks.git","ssh_url":"git@github.com:Microsoft/vsts-tasks.git","clone_url":"https://github.com/Microsoft/vsts-tasks.git","svn_url":"https://github.com/Microsoft/vsts-tasks","homepage":" https://www.visualstudio.com/features/devops-vs","size":12354,"stargazers_count":313,"watchers_count":313,"language":"PowerShell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":249,"mirror_url":null,"open_issues_count":107,"forks":249,"open_issues":107,"watchers":313,"default_branch":"master"}},"base":{"label":"Microsoft:releases/m95","ref":"releases/m95","sha":"6f1d94f32bd227b851c7e49c1741718b6f7ebf1e","user":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":27631673,"name":"vsts-tasks","full_name":"Microsoft/vsts-tasks","owner":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/vsts-tasks","description":"Build and Release Tasks for Visual Studio Online and Team Foundation Server","fork":false,"url":"https://api.github.com/repos/Microsoft/vsts-tasks","forks_url":"https://api.github.com/repos/Microsoft/vsts-tasks/forks","keys_url":"https://api.github.com/repos/Microsoft/vsts-tasks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/vsts-tasks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/vsts-tasks/teams","hooks_url":"https://api.github.com/repos/Microsoft/vsts-tasks/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/vsts-tasks/events","assignees_url":"https://api.github.com/repos/Microsoft/vsts-tasks/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/vsts-tasks/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/vsts-tasks/tags","blobs_url":"https://api.github.com/repos/Microsoft/vsts-tasks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/vsts-tasks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/vsts-tasks/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/vsts-tasks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/vsts-tasks/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/vsts-tasks/languages","stargazers_url":"https://api.github.com/repos/Microsoft/vsts-tasks/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/vsts-tasks/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/vsts-tasks/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/vsts-tasks/subscription","commits_url":"https://api.github.com/repos/Microsoft/vsts-tasks/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/vsts-tasks/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/vsts-tasks/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/vsts-tasks/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/vsts-tasks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/vsts-tasks/merges","archive_url":"https://api.github.com/repos/Microsoft/vsts-tasks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/vsts-tasks/downloads","issues_url":"https://api.github.com/repos/Microsoft/vsts-tasks/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/vsts-tasks/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/vsts-tasks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/vsts-tasks/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/vsts-tasks/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/vsts-tasks/deployments","created_at":"2014-12-06T11:11:46Z","updated_at":"2016-05-07T20:13:16Z","pushed_at":"2016-05-09T10:50:42Z","git_url":"git://github.com/Microsoft/vsts-tasks.git","ssh_url":"git@github.com:Microsoft/vsts-tasks.git","clone_url":"https://github.com/Microsoft/vsts-tasks.git","svn_url":"https://github.com/Microsoft/vsts-tasks","homepage":" https://www.visualstudio.com/features/devops-vs","size":12354,"stargazers_count":313,"watchers_count":313,"language":"PowerShell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":249,"mirror_url":null,"open_issues_count":107,"forks":249,"open_issues":107,"watchers":313,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls/1646"},"html":{"href":"https://github.com/Microsoft/vsts-tasks/pull/1646"},"issue":{"href":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/1646"},"comments":{"href":"https://api.github.com/repos/Microsoft/vsts-tasks/issues/1646/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls/1646/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/vsts-tasks/pulls/1646/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/vsts-tasks/statuses/74ac4458bce417bc265ddbb4a855dd4876c20f79"}}}}