Hi @Anonymous ,
maybe this helps:
# For Windows VMs
Get-AzVM | Select -ExpandProperty OSProfile | Select -ExpandProperty Windowsconfiguration
# For Linux VMs
Get-AzVM | Select -ExpandProperty OSProfile | Select -ExpandProperty Linuxconfiguration
----------
(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)
Regards
Andreas Baumgarten