@Sam Turner Can you check if the below script mentioned here solves your query:
$vms = get-azvm
$nics = get-aznetworkinterface | where VirtualMachine -NE $null #skip Nics with no VMforeach($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"
}
}
This article might be helpful too.
Hope it helps!!!
Disclaimer: This response contains a reference to a third-party World Wide Web site. Microsoft is providing this information as convenient to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there.
Please "Accept as Answer" if it helped so it can help others in community looking for help on similar topics.