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,834
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

Action Change Windows domain PC Name
by  max204   Go to last post Go to first unread
Last post: 9/19/2019 10:28:29 AM(UTC)
Lansweeper Launch PowerShell remote PSSession
by  Ian  
Go to last post Go to first unread
Last post: 9/9/2019 12:10:56 PM(UTC)
Action Remote print management
by  CyberCitizen   Go to last post Go to first unread
Last post: 9/4/2019 3:53:00 AM(UTC)
Lansweeper Infopath installer help
by  CyberCitizen  
Go to last post Go to first unread
Last post: 9/2/2019 8:18:06 AM(UTC)
Lansweeper Remote Registry 2019
by  EB   Go to last post Go to first unread
Last post: 8/22/2019 3:47:10 PM(UTC)
Lansweeper lspush smtp direct send
by  Danilo Ferrari  
Go to last post Go to first unread
Last post: 8/1/2019 1:39:26 PM(UTC)
Action Delete old user profiles
by  DaveDischord   Go to last post Go to first unread
Last post: 7/30/2019 6:18:28 PM(UTC)
Lansweeper Best way to delete multiple registries
by  Corcos  
Go to last post Go to first unread
Last post: 7/25/2019 8:18:23 PM(UTC)