Notification

Icon
Error

Azure: Asset resources for subscriptions (Built-in)

Posted: Tuesday, March 5, 2019 1:14:44 PM(UTC)
Esben.D

Esben.D

Member Administration Original PosterPosts: 1,977
0
Like
The report below gives back a list of Azure assets per subscription.

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

Code:
Select Top 1000000 *
From (Select tblAssets.AssetID,
        tblAzureResourceGroup.SubscriptionId,
        tblAssets.AssetName,
        tsysAssetTypes.AssetTypeIcon10 As icon,
        tsysAssetTypes.AssetTypename As AssetType,
        tblAzureResourceGroup.Region,
        tblAzureResourceGroup.Tags,
        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 tblAzureResourceGroup On tblAzureResourceGroup.AssetId =
          tblAssets.AssetID
      Where tblState.Statename = 'Active'
      Union All
      Select tblAssets.AssetID,
        tblAzureResourceGroup.SubscriptionId,
        tblAssets.AssetName,
        tsysAssetTypes.AssetTypeIcon10 As icon,
        tsysAssetTypes.AssetTypename As AssetType,
        tblAzureVirtualMachine.Region,
        tblAzureVirtualMachine.Tags,
        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
      Where tblState.Statename = 'Active') SQ
Order By SQ.SubscriptionId,
  SQ.AssetType,
  SQ.AssetName

Active Discussions

Lansweeper Changes in the licensing model
by  mcbeathb   Go to last post Go to first unread
Last post: Today at 6:47:51 AM(UTC)
Lansweeper About Memory Changes
by  fjca  
Go to last post Go to first unread
Last post: Yesterday at 5:51:17 PM(UTC)
Lansweeper Wildcard in file scanning to get all files in a directory?
by  RKCar   Go to last post Go to first unread
Last post: Yesterday at 4:03:43 PM(UTC)
Lansweeper Wishlist is dead, no responses from LS staff.
by  RobertB  
Go to last post Go to first unread
Last post: Yesterday at 3:08:12 PM(UTC)
Lansweeper Deploy installer packages not working any more
by  richv   Go to last post Go to first unread
Last post: Yesterday at 3:06:19 PM(UTC)
Lansweeper File Scanning
by  RKCar  
Go to last post Go to first unread
Last post: Yesterday at 2:22:54 PM(UTC)
Lansweeper HP Warranty scan - broken for some products
by  zaty   Go to last post Go to first unread
Last post: Yesterday at 1:52:38 PM(UTC)
Lansweeper How to stop deployments ?
by  Leandro Martins  
Go to last post Go to first unread
Last post: Yesterday at 1:47:22 PM(UTC)