Notification

Icon
Error

Azure: Virtual Machines primary network interface (Built-in)

Posted: Tuesday, March 5, 2019 1:12:26 PM(UTC)
Esben.D

Esben.D

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

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,
  tblAzureNetworkInterface.Name As InterfaceName,
  tblAzureNetworkInterface.MacAddress,
  tblAzureIpConfiguration.PrivateIpAddress,
  tblAzureIpConfiguration.PrivateIpAllocationMethod,
  tblAzureIpConfiguration.PublicIpAddress,
  tblAzureIpConfiguration.PublicIpAllocationMethod,
  tblAzureNetworkInterface.Region As InterfaceRegion,
  tblAzureNetworkInterface.Tags As InterfaceTags,
  tblAzureNetworkInterface.IsAcceleratedNetworkingEnabled,
  tblAzureNetworkInterface.IsIpForwardingEnabled,
  tblAzureNetworkInterface.IsPrimaryNetworkInterface,
  tblAzureNetworkInterface.InternalDnsNameLabel,
  tblAzureNetworkInterface.InternalDomainNameSuffix,
  tblAzureNetworkInterface.InternalFqdn,
  tblAzureNetworkInterface.DnsServers,
  tblAzureNetworkInterface.AppliedDnsServers,
  tblAzureIpConfiguration.IsPrimary,
  tblAzureIpConfiguration.Fqdn,
  tblAzureIpConfiguration.ReverseFqdn,
  tblAzureIpConfiguration.LeafDomainLabel,
  tblAzureIpConfiguration.IdleTimeoutInMinutes,
  tblAzureIpConfiguration.HasAssignedLoadBalancer,
  tblAssets.Lastseen,
  tblAssets.Lasttried
From tblAssets
  Inner Join tblAzureVirtualMachine On tblAzureVirtualMachine.AssetId =
    tblAssets.AssetID
  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.Id =
    tblAzureVirtualMachine.AzureResourceGroupId
  Inner Join tblAzureNetworkInterface On
    tblAzureNetworkInterface.AzureVirtualMachineId = tblAzureVirtualMachine.Id
  Inner Join tblAzureIpConfiguration On
    tblAzureIpConfiguration.AzureNetworkInterfaceId =
    tblAzureNetworkInterface.Id
Where tblAzureIpConfiguration.IsPrimary = 1 And tblState.Statename = 'Active'
Order By tblAssets.AssetName,
  ResourceGroupName

Active Discussions

Lansweeper 2019 Fall Release
by  Esben.D   Go to last post Go to first unread
Last post: 9/5/2019 3:48:58 PM(UTC)
Lansweeper Introducing Our Brand New Report Library
by  Esben.D  
Go to last post Go to first unread
Last post: 7/2/2019 2:09:53 PM(UTC)
Lansweeper Lansweeper subreddit
by  Esben.D   Go to last post Go to first unread
Last post: 4/4/2019 8:57:11 AM(UTC)
Lansweeper 2019 Spring Release
by  Esben.D  
Go to last post Go to first unread
Last post: 3/5/2019 4:11:32 PM(UTC)
Lansweeper Mozilla Firefox Remote Execution Vulnerability
by  Esben.D   Go to last post Go to first unread
Last post: 10/5/2018 12:33:36 PM(UTC)
Lansweeper Lansweeper 7 Released
by  Esben.D  
Go to last post Go to first unread
Last post: 9/19/2018 1:33:10 PM(UTC)
Lansweeper MEGA Chrome Extension Vulnerability
by  Esben.D   Go to last post Go to first unread
Last post: 9/6/2018 1:25:43 PM(UTC)
Lansweeper Intel Foreshadow Vulnerability
by  Esben.D  
Go to last post Go to first unread
Last post: 8/20/2018 1:54:28 PM(UTC)