Get the machine name of an Azure worker or web role using PowerShell?


Is there any way using the PowerShell Azure cmdlets to get the machine name on which an Azure worker or web role is running? Specifically, I’m looking for the name that starts with “RD”. I’m not 100% sure if I’m searching for this using the right terminology, because my results are clouded with information about Azure Virtual Machines. I’ve also been exploring the objects returned from such calls as Get-AzureDeployment and Get-AzureVM, but haven’t found the “RD” name anyplace yet.

I’ve also found the discussion here, but wondering if it’s out of date:

Motivation: My New Relic monitoring often complains “server not reporting” for instances that have been decommissioned. New Relic’s server monitoring knows only the “RD…” names, and I’m looking for a quick way to get a list of these from Azure so that I can compare and see if New Relic is only complaining about old instances or if there’s a real problem with one of the current instances.


You can actually get more significant host names than RD… by setting the vmName key in the cloud service’s ServiceConfiguration file.

Then, your host names will be of the form vmnameXX, where XX is the instance number of the role. (i.e. “MyApp01”, “MyApp02”, …)

For details on this, see the links below:


Get the machine name of an Azure worker or web role using PowerShell? by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply