Export and update tag key and tag value

Hello,

  1. How to export specific tag key and tag value of Azure VM in CSV file. I need a output like below
VMName ResourceGroup Status Subscription OS Role
VM1 rg1 VM deallocated mg-stage01-qadr Win Admin
vm2 rg2 VM deallocated mg-stage01-qadr Lin Contributor
How to update tag value to specific tag key for Azure VM which has multiple tag keys.

Someone kindly help on this to get specific Tag key-value pair from Azure

Never worked with Azure VMs, what do you mean by specific tag key-value here ?

Where have you looked?
What do you search for?
What have you tried?
Where is the code you are using and detail / show what errors you are having.
You cannot ‘export’ tags or other descriptive info, you can only report on them.

MS provides guidance and resources for one to do this sort of use case.
There are several blogs posts similar to what you are after, even pre-built script in such posts.

Using a search string like
‘report on azure vm tag info’

Example(s) -
Script Sample - Generate Azure Resources Report by Tags

PowerShell for Assigning and Querying Tags in Azure

Even scrips on the MS PowerShellGallery.com

Azure ARM Detailed VM Inventory with Tags
Sample script to export detailed Azure ARM VM with Tags The output creates 1 file per subscription and allows filtering by Key tag values. Support up to 15 tags key per subscription.

Download : AzureARMVMinventorywithTags.ps1
https://gallery.technet.microsoft.com/scriptcenter/Azure-ARM-VM-Inventory-57ba01b7