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,676
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 Firefox 67.0.3 zero-day vulnerability
by  B Claeys   Go to last post Go to first unread
Last post: Today at 3:13:30 PM(UTC)
Lansweeper BlueKeep Vulnerability
by  heybobby1  
Go to last post Go to first unread
Last post: Today at 3:02:34 PM(UTC)
Lansweeper VLC Player CVE-2019-5439
by  Esben.D   Go to last post Go to first unread
Last post: Yesterday at 9:19:29 AM(UTC)
Lansweeper Enabled/Disabled Local/AD Admin accounts
by  vqT4cDoP9iXyMZwoDUWU  
Go to last post Go to first unread
Last post: 6/17/2019 9:12:30 PM(UTC)
Lansweeper code in posts
by  AZHockeyNut   Go to last post Go to first unread
Last post: 6/14/2019 4:39:46 PM(UTC)
Lansweeper Adding more info to asset report
by  RC62N   Go to last post Go to first unread
Last post: 6/13/2019 9:46:31 PM(UTC)
Report Center Top 5 Average RAM Usage
by  Esben.D  
Go to last post Go to first unread
Last post: 6/13/2019 1:15:31 PM(UTC)