I am trying to get a list of all Virtual Machine Instances within all Scale Sets of a subscription using powershell.
I have been able to list out all the Scalesets by using the code below, but I would like to show all the Virtual Machine instances within each one.
$azureSubs = Get-AzSubscription -TenantID xxxxxxxxxxxxxxxxx
$azureSubs | ForEach-Object {Select-AzSubscription $_ | Out-Null; Get-AzVMss -WarningAction SilentlyContinue} | Export-Csv -Path "c:\Azure\VirtualMachinesScaleSet.csv" -NoTypeInformation
Can anyone suggest anything to help.