最佳答案
使用 PowerShell:
$vms = get-azvm
$nics = get-aznetworkinterface | where VirtualMachine -NE $null #skip Nics with no VM
foreach($nic in $nics)
{
$vm = $vms | where-object -Property Id -EQ $nic.VirtualMachine.id
$prv = $nic.IpConfigurations | select-object -ExpandProperty PrivateIpAddress
$alloc = $nic.IpConfigurations | select-object -ExpandProperty PrivateIpAllocationMethod
if ($vm.Name -NE $null) {
Write-Output "$($vm.Name) : $prv , $alloc"
}
}
使用门户。
- 转到虚拟机
- 编辑列
- 添加私有(private) IP 地址
关于azure - 如何列出 AZURE 订阅中的所有虚拟机专用 IP?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63522689/