How can Azure instance determine its instance level public ip address (ILPIP)?

1k views Asked by At

Azure provides the ability to get instance level public IP addresses (ILPIP):

https://azure.microsoft.com/en-us/documentation/articles/virtual-networks-instance-level-public-ip/

Is there a way for each instance to determine the public IP address assigned to it?

1

There are 1 answers

2
jangelfdez On

You can use the Azure PowerShell module inside the VM to check for the ILPIP like this:

#Get the associated Public IP Name for a virtual machine
Get-AzureVM -ServiceName "YourCloudServiceDomain" -Name "YourVMName" | Get-AzurePublicIP

or

#Get the assigned Public IP Address for a virtual machine
$instance = Get-AzureVM -ServiceName "YourCloudServiceDomain" -Name "YourVMName"
$instance.PublicIPAddress

If you prefer a REST Api you can check the List Reserved IP Address call https://msdn.microsoft.com/library/azure/dn722418.aspx/