Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

azure kql to get OSversion and OSName from VMSS

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.

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

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"
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading