1
resources
 | where type == "microsoft.compute/virtualmachinescalesets"
 | extend
extensions = properties.virtualMachineProfile.extensionProfile.extensions,
osName = properties.virtualMachineProfile.storageProfile.osDisk.osName,
osVersion = properties.virtualMachineProfile.storageProfile.osDisk.osVersion,
osType = properties.virtualMachineProfile.storageProfile.osDisk.osType

I can get osType which "Linux" but I want OSName (like ubuntu, Redhut) osVersion( like version 18, 19)
what I need to do to get that.

David דודו Markovitz
  • 42,900
  • 6
  • 64
  • 88
raindrop
  • 525
  • 1
  • 9
  • 16

1 Answers1

1
resources
|   where   type == "microsoft.compute/virtualmachinescalesets"
|   extend  publisher   = properties.virtualMachineProfile.storageProfile.imageReference.publisher
           ,version     = properties.virtualMachineProfile.storageProfile.imageReference.version
           ,sku         = properties.virtualMachineProfile.storageProfile.imageReference.sku
           ,offer       = properties.virtualMachineProfile.storageProfile.imageReference.offer

P.S.

Here is a "tool" that you might find useful:

resources
| where type == "microsoft.compute/virtualmachinescalesets"
| where * has "ubuntu"
David דודו Markovitz
  • 42,900
  • 6
  • 64
  • 88