title: Azure. get all resources names, type with Key:value tag in same column
body: <p>This Is what I would like to. with powershell (or Az cli) Get a list of ALL my resources in azure with the name of the resource, type and tag  with key pair exported in an excel like following example, and only bring information if tag value is some particular that I declare in command.</p>
  
  <p>For example: bring all my azure resources if value of tag3=value3</p>
  
  <pre><code> name   type      tag1    tag2    tag3
    VM1    v.mach  value1   value2  value3
  webapp2   wapp   ValueX   Value85 value3
   disk8    disk   valueF   value89 value3
  </code></pre>
  
  <p>result I would like to bring it in a csv file. I know this is done with at the end of command:</p>
  
  <pre><code>| Export-Csv -Path "C:\Windows\azureinventory.csv"
  </code></pre>
  
  <p>but right now I can´t bring results with tag separated.</p>
  
  <p>I tried following command but tag column brings value on same column. Would like to get them separated like in first example:</p>
  
  <pre><code>Get-AzureRmResource -TagName "LifeTime"  | where { $_.Tags['LifeTime'] -eq "20170503" } | Select-Object -Unique Name, Type, tags
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/5tFKv.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5tFKv.jpg" alt="enter image description here"></a></p>