title: Powershell get Azure VM name from private IP
body: <p>I want to get azure VM name from IP address, I tried following to get NIC name from IP and find to which VM that NIC is attached.</p>
  
  <p><code>Get-AzureRmNetworkInterface | ForEach { $Interface = $_.Name; $IPs = $_ | Get-AzureRmNetworkInterfaceIpConfig | Select PrivateIPAddress; Write-Host $Interface $IPs.PrivateIPAddress }</code></p>
  
  <p>Is there a better way to get VM name directly using VM private ?</p>