Notification

Icon
Error

Azure: Virtual Machines disks (Built-in)

Posted: Tuesday, March 5, 2019 1:13:00 PM(UTC)
Esben.D

Esben.D

Member Administration Original PosterPosts: 1,827
0
Like
The report below gives back a list of Azure virtual machine assets and their disks.

The report will only list assets when the following criteria are met:
  • You have Lansweeper 7.1 or higher.
  • There is Azure virtual machine data scanned.
  • The asset state is active.

Code:
Select Top 1000000 tblAssets.AssetID,
  tblAssets.AssetName,
  tsysAssetTypes.AssetTypeIcon10 As icon,
  tblAzureVirtualMachine.PowerState,
  tblAzureVirtualMachine.OsType As [OS Type],
  tblAzureVirtualMachine.Region,
  tblAzureVirtualMachine.Tags,
  tblAzureResourceGroup.Name As ResourceGroupName,
  tblAzureResourceGroup.SubscriptionId,
  tblAzureDisk.Name As DiskName,
  tblAzureVirtualMachineDataDisk.DiskType,
  tblAzureDisk.OsType As DiskOS,
  tblAzureDisk.DiskSizeGb,
  tblAzureDisk.Region As DiskRegion,
  tblAzureDisk.Tags As DiskTags,
  tblAzureDisk.TimeCreated,
  tblAzureDisk.CreationMethod,
  tblAzureDisk.StorageAccountType,
  tblAzureDisk.CreationSourceType,
  tblAzureDisk.Zones,
  tblAzureVirtualMachineDataDisk.Lun,
  tblAzureVirtualMachineDataDisk.VhdUri,
  tblAzureVirtualMachineDataDisk.ImageUri,
  tblAzureVirtualMachineDataDisk.IsWriteAcceleratorEnabled,
  tblAzureVirtualMachineDataDisk.IsDiskEncryptionEnabled,
  tblAzureVirtualMachineDataDisk.CachingType,
  tblAssets.Lastseen,
  tblAssets.Lasttried
From tblAssets
  Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
  Inner Join tblAssetCustom On tblAssetCustom.AssetID = tblAssets.AssetID
  Inner Join tblState On tblState.State = tblAssetCustom.State
  Inner Join tblAzureVirtualMachine On tblAzureVirtualMachine.AssetId =
    tblAssets.AssetID
  Inner Join tblAzureResourceGroup On tblAzureResourceGroup.Id =
    tblAzureVirtualMachine.AzureResourceGroupId
  Inner Join tblAzureVirtualMachineDataDisk On
    tblAzureVirtualMachineDataDisk.AzureVirtualMachineId =
    tblAzureVirtualMachine.Id
  Inner Join tblAzureDisk On
    tblAzureDisk.Id = tblAzureVirtualMachineDataDisk.AzureDiskId
Where tblState.Statename = 'Active'
Order By tblAssets.AssetName,
  ResourceGroupName

Active Discussions

Installer Sophos Silent Install
by  mzipperer   Go to last post Go to first unread
Last post: 9/5/2019 11:00:34 PM(UTC)
Installer Team Viewer Host update / install
by  CyberCitizen  
Go to last post Go to first unread
Last post: 8/15/2019 6:18:33 AM(UTC)
Installer Script - Reset Local Admin Password
by  Ricky Hignite   Go to last post Go to first unread
Last post: 7/26/2019 6:30:06 PM(UTC)
Installer LsAgent for Windows
by  bbeavis  
Go to last post Go to first unread
Last post: 7/15/2019 10:17:18 PM(UTC)
Installer Uninstall - Adobe Acrobat 9x
by  mzipperer   Go to last post Go to first unread
Last post: 7/12/2019 9:15:51 PM(UTC)
Installer Upgrade Windows 10 to 1803
by  Richard A  
Go to last post Go to first unread
Last post: 7/9/2019 2:05:20 PM(UTC)
Installer VLC Media Player Installer v3.0.7.1
by  Nando   Go to last post Go to first unread
Last post: 7/3/2019 12:51:23 PM(UTC)
Installer VLC 3.0.7.1 Installer - If Exists - For Exploit Patching
by  zbwalker  
Go to last post Go to first unread
Last post: 6/18/2019 3:56:41 PM(UTC)