achahbar
achahbar

Reputation: 991

Get ResourceName based on Resource ID (GUID) - Azure

With the Partner center Powershell module I can get all the info of my customers billing profile with the command Get-CustomerSubsctionUsage. Now This command doesn't give back the Resource name. So I tried getting the name from Get-AzureRmResource which will provide the name , resourcegroupname , ... It even can do that based on an Id Get-AzureRmResource -ResourceId /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/testRG/providers/Microsoft.Compute/virtualMachines/testVM But The problem is, The Id that I can provide from the usage data is not the same as the id that the command needs.

I tried to get the resource uri from another command inside the partner center module. But because I really need to have the first command for the cost data. It was hard to get the resourceUri per resource I found inside the first command. That's why now I just want to get the resource name from the AzureRm module. But It can't seem to find any right way to get it properly. The reason why i want to do this is because the resourceID or the resource name that the partner center module provided is not presentable on a power bi report

TL;DR : I want to get the Azure Resource name based on the Resource GUID

Upvotes: 1

Views: 12137

Answers (1)

Rahul Ruikar
Rahul Ruikar

Reputation: 1086

Similar question has been asked on this forum related to Azure resource GUID and billing. GUID(Resource Id) in this usage data does not refer to the Id of any resource like Virtual machine or storage. Look like its merely deployment GUID

ref. How to get resource name from Azure Resource GUID?

https://social.msdn.microsoft.com/Forums/vstudio/en-US/01695990-a309-4a07-9c7e-e2cf0acfa3d6/resource-guid-in-azure-portal?forum=windowsazurepurchasing

Upvotes: 1

Related Questions