We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trying to handle adding tags while not overwriting the current tags on the resource by adding them to the $tags hash-table like shown here:
https://azure.microsoft.com/en-us/documentation/articles/resource-group-using-tags/
Same error in both Azure Automation Runbook and my station.
updates all packages and they work fine.
It works on Set-AzureRmResourcegroup but not on Set-AzureRmResource
Error message:
Set-AzureRmResource : The pipeline has been stopped. At line:1 char:1 + Set-AzureRmResource -ResourceId $rm.ResourceGroupName -Tag $tags + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : CloseError: (:) [Set-AzureRmResource], PipelineStoppedException + FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.SetAzureResourceCmdlet Set-AzureRmResource : MissingSubscription : The request did not have a provided subscription. All requests must have an asso ciated subscription Id. At line:1 char:1 + Set-AzureRmResource -ResourceId $rm.ResourceGroupName -Tag $tags + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : CloseError: (:) [Set-AzureRmResource], ErrorResponseMessageException + FullyQualifiedErrorId : MissingSubscription,Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.SetAzureR esourceCmdlet
Code:
$naming = Import-Csv "E:\tags.csv" foreach ($name in $naming){ $nameContains=$name.nameConvention $rms=Find-AzureRmResource -ResourceNameContains $nameContains -ExpandProperties foreach($rm in $rms){ $id=$rm.ResourceId $tags=$rm.tags if ($rm.name -Match $name.nameConvention ){ $value=$name.tag if($value){ if($tags){ $exist=$false foreach ($tag in $tags){ if ($tag.Values -contains "Customer"){ $exist=$true }} if ($exist -eq $false){ foreach($newtag in $tags){ $tags| get-member } $newthing=@( @{ Name="Customer"; Value=$value}) $tags += @{ Name="Customer"; Value=$value } Set-AzureRmResource -ResourceName $rm.ResourceName -ResourceType $rm.ResourceType -Tag $tags }} else { $value=$name.tag Set-AzureRmResource -ResourceId $id -Tag @( @{ Name="Customer"; Value=$value ; $tags. }) -Force } } } } }
The text was updated successfully, but these errors were encountered:
It seems to have something to do with properties that have "hidden-link" tag in them.
Sorry, something went wrong.
did you ever resolve your issue?
No branches or pull requests
Trying to handle adding tags while not overwriting the current tags on the resource
by adding them to the $tags hash-table like shown here:
https://azure.microsoft.com/en-us/documentation/articles/resource-group-using-tags/
Same error in both Azure Automation Runbook and my station.
updates all packages and they work fine.
It works on Set-AzureRmResourcegroup but not on Set-AzureRmResource
Error message:
Code:
The text was updated successfully, but these errors were encountered: