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,676
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 LsAgent install issue
by  moug   Go to last post Go to first unread
Last post: Today at 3:12:47 PM(UTC)
Lansweeper Spare Hard Drives
by  brodiemac  
Go to last post Go to first unread
Last post: Today at 2:32:31 PM(UTC)
Lansweeper Adding Events via Meeting Request
by  Esben.D  
Go to last post Go to first unread
Last post: Today at 10:32:17 AM(UTC)
Lansweeper Add Document as File Link
by  mowo   Go to last post Go to first unread
Last post: Today at 10:28:33 AM(UTC)
Lansweeper Same Name and Domain
by  Esben.D  
Go to last post Go to first unread
Last post: Today at 10:26:22 AM(UTC)
Lansweeper Logs of User activity
by  Esben.D   Go to last post Go to first unread
Last post: Today at 9:50:00 AM(UTC)
Lansweeper O365 scanning issue
by  Esben.D  
Go to last post Go to first unread
Last post: Today at 9:44:35 AM(UTC)