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,966
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 TPM scanning
by  gene@sca   Go to last post Go to first unread
Last post: Yesterday at 10:40:24 PM(UTC)
Lansweeper Bulk AssetLock set
by  tcooper  
Go to last post Go to first unread
Last post: Yesterday at 6:24:15 PM(UTC)
Lansweeper Set AssetType based on Model?
by  tcooper   Go to last post Go to first unread
Last post: Yesterday at 6:16:57 PM(UTC)
Lansweeper Public IP Address
by  David Goodwin  
Go to last post Go to first unread
Last post: Yesterday at 4:57:14 PM(UTC)
Lansweeper Exchange Scan in v7 and DAG
by  Peter.Riederer   Go to last post Go to first unread
Last post: Yesterday at 8:42:48 AM(UTC)
Lansweeper Asset Scanning - Change Types
by  DNuhija  
Go to last post Go to first unread
Last post: 12/12/2019 5:40:47 PM(UTC)
Lansweeper Plundervolt
by  NWSF   Go to last post Go to first unread
Last post: 12/12/2019 5:10:14 PM(UTC)
Lansweeper MSI Package
by  Stefano Magri  
Go to last post Go to first unread
Last post: 12/12/2019 3:34:16 PM(UTC)