{"action":"created","issue":{"url":"https://api.github.com/repos/tjanczuk/git-azure/issues/63","repository_url":"https://api.github.com/repos/tjanczuk/git-azure","labels_url":"https://api.github.com/repos/tjanczuk/git-azure/issues/63/labels{/name}","comments_url":"https://api.github.com/repos/tjanczuk/git-azure/issues/63/comments","events_url":"https://api.github.com/repos/tjanczuk/git-azure/issues/63/events","html_url":"https://github.com/tjanczuk/git-azure/issues/63","id":155282075,"number":63,"title":"Set-AzureRmResource  returns \" The pipeline has been stopped.\" When trying to add tags in hashtable","user":{"login":"Yanivro","id":16425976,"avatar_url":"https://avatars.githubusercontent.com/u/16425976?v=3","gravatar_id":"","url":"https://api.github.com/users/Yanivro","html_url":"https://github.com/Yanivro","followers_url":"https://api.github.com/users/Yanivro/followers","following_url":"https://api.github.com/users/Yanivro/following{/other_user}","gists_url":"https://api.github.com/users/Yanivro/gists{/gist_id}","starred_url":"https://api.github.com/users/Yanivro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yanivro/subscriptions","organizations_url":"https://api.github.com/users/Yanivro/orgs","repos_url":"https://api.github.com/users/Yanivro/repos","events_url":"https://api.github.com/users/Yanivro/events{/privacy}","received_events_url":"https://api.github.com/users/Yanivro/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-17T14:59:03Z","updated_at":"2016-05-17T15:18:46Z","closed_at":null,"body":"Trying to handle adding tags while not overwriting the current tags on the resource\r\nby adding them to the $tags hash-table like shown here: \r\n\r\nhttps://azure.microsoft.com/en-us/documentation/articles/resource-group-using-tags/\r\n\r\n\r\nSame error in both Azure Automation Runbook and my station.\r\n\r\nupdates all packages and they work fine.\r\n\r\nIt works on Set-AzureRmResourcegroup but not on Set-AzureRmResource\r\n\r\n**Error message:**\r\n\r\n```\r\nSet-AzureRmResource : The pipeline has been stopped.\r\nAt line:1 char:1\r\n+ Set-AzureRmResource -ResourceId $rm.ResourceGroupName -Tag $tags\r\n+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n    + CategoryInfo          : CloseError: (:) [Set-AzureRmResource], PipelineStoppedException\r\n    + FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.SetAzureResourceCmdlet\r\n \r\nSet-AzureRmResource : MissingSubscription : The request did not have a provided subscription. All requests must have an asso\r\nciated subscription Id.\r\nAt line:1 char:1\r\n+ Set-AzureRmResource -ResourceId $rm.ResourceGroupName -Tag $tags\r\n+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n    + CategoryInfo          : CloseError: (:) [Set-AzureRmResource], ErrorResponseMessageException\r\n    + FullyQualifiedErrorId : MissingSubscription,Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.SetAzureR \r\n   esourceCmdlet\r\n```\r\n \r\n\r\n\r\n**Code:**\r\n\r\n```\r\n$naming = Import-Csv \"E:\\tags.csv\"\r\n\r\nforeach ($name in $naming){\r\n\r\n$nameContains=$name.nameConvention\r\n$rms=Find-AzureRmResource -ResourceNameContains $nameContains -ExpandProperties\r\n\r\n\r\nforeach($rm in $rms){\r\n\t\r\n\t\t$id=$rm.ResourceId\r\n\t\t$tags=$rm.tags\r\n\r\n\t\t\t\r\n\t\t\t\tif ($rm.name -Match $name.nameConvention ){\r\n\t\t\t\t\t$value=$name.tag\r\n\t\t\t\t\tif($value){\r\n\t\t\t\t\t\r\n\t\t\t\tif($tags){\r\n\t\t\t\t\t$exist=$false\r\n\t\t\t\t\tforeach ($tag in $tags){\t\r\n\t\t\t\t\t\tif ($tag.Values -contains \"Customer\"){\r\n\t\t\t\t\t\t\t$exist=$true }}\r\n\t\t\t\t\tif ($exist -eq $false){\r\n\t\t\t\t\t\r\nforeach($newtag in $tags){\r\n\r\n$tags| get-member\r\n\r\n}\r\n\r\n$newthing=@( @{ Name=\"Customer\"; Value=$value})\r\n\r\n\t\t\t\t\t$tags += @{ Name=\"Customer\"; Value=$value }\r\n\t\t\t\t\t\r\n\t\t\t\t\tSet-AzureRmResource -ResourceName $rm.ResourceName -ResourceType $rm.ResourceType -Tag $tags \r\n\r\n\r\n\t\t\t\t}} else {\r\n\r\n\t\t\t\t\t$value=$name.tag\r\n\t\t\t\t\t\r\n\t\t\t\t\tSet-AzureRmResource -ResourceId $id -Tag @( @{ Name=\"Customer\"; Value=$value ; $tags. }) -Force\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\r\n\t}\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/tjanczuk/git-azure/issues/comments/219751455","html_url":"https://github.com/tjanczuk/git-azure/issues/63#issuecomment-219751455","issue_url":"https://api.github.com/repos/tjanczuk/git-azure/issues/63","id":219751455,"user":{"login":"Yanivro","id":16425976,"avatar_url":"https://avatars.githubusercontent.com/u/16425976?v=3","gravatar_id":"","url":"https://api.github.com/users/Yanivro","html_url":"https://github.com/Yanivro","followers_url":"https://api.github.com/users/Yanivro/followers","following_url":"https://api.github.com/users/Yanivro/following{/other_user}","gists_url":"https://api.github.com/users/Yanivro/gists{/gist_id}","starred_url":"https://api.github.com/users/Yanivro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yanivro/subscriptions","organizations_url":"https://api.github.com/users/Yanivro/orgs","repos_url":"https://api.github.com/users/Yanivro/repos","events_url":"https://api.github.com/users/Yanivro/events{/privacy}","received_events_url":"https://api.github.com/users/Yanivro/received_events","type":"User","site_admin":false},"created_at":"2016-05-17T15:18:46Z","updated_at":"2016-05-17T15:18:46Z","body":"It seems to have something to do with properties that have \"hidden-link\" tag in them."}}