Skip to content

Instantly share code, notes, and snippets.

@SQLtattoo
Created April 30, 2020 06:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SQLtattoo/97a54d9a9a09eb24a2c25670f0d2a01f to your computer and use it in GitHub Desktop.
Save SQLtattoo/97a54d9a9a09eb24a2c25670f0d2a01f to your computer and use it in GitHub Desktop.
Get the private IPs of all network interfaces in an Azure resource group
Get-AzNetworkInterface -ResourceGroupName your-resoure-group-name-here `
| ForEach { `
$Interface = $_.Name; $IPs = $_ `
| Get-AzNetworkInterfaceIpConfig `
| Select PrivateIPAddress; Write-Host $Interface $IPs.PrivateIPAddress `
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment