Good afternoon I am trying to create a report that will get a list of all servers that we have within our datacenter this report should also include the make, model, serial number, type and number of processors, amount of ram, and other custom fields.
I created one already that does almost 90% of the work I'm looking for, but I'm running into an issue where it is not finding the VMware ESXi servers so it can't find our vSAN nodes If someone could take a look at the following code that I put down and let me know what I'm doing wrong as to why I'm not seeing the vSAN nodes I'd be grateful
Select Top (1000000) tsysOS.Image As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tblAssets.Username,
tblAssets.IPAddress,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tblAssetCustom.SerialNumberScanned As [Serial Number],
tblAssets.Description,
tblAssetCustom.Comments,
tblAssets.Processor As [Processor Type],
tblAssets.NrProcessors As [# of Processors],
Cast(Round(CorrectMemory.Memory / 1024, 2, 1) As decimal(10,1)) As
[Memory (GB)],
Cast(Round(tblPhysicalMemoryArray.MaxCapacity / 1024 / 1024, 2,
1) As decimal(10,1)) As [Max Memory Capacity],
Cast(CorrectMemory.Used As numeric) As [Slots used],
tblPhysicalMemoryArray.MemoryDevices As [Slots available],
tblAssetCustom.Location,
tblAssetCustom.Building,
tblAssetCustom.Department,
tblAssetCustom.Branchoffice,
tblAssetCustom.PurchaseDate,
tblAssetCustom.Warrantydate,
tblAssetCustom.Custom1 As Row#,
tblAssetCustom.Custom2 As Rack#,
tblAssetCustom.Custom3 As [Rack Position],
tblAssetCustom.Custom4 As [Server Size],
tblAssetCustom.Custom5 As [PP Warranty Start],
tblAssetCustom.Custom6 As [PP Warranty End],
tblAssetCustom.Custom7 As [PP Warranty #],
tblAssetCustom.Custom8 As [Verified in Zabbix],
tblAssetCustom.Custom9 As [Rubrik Backup Verified],
tblAssetCustom.Custom10 As PO#,
tblAssetCustom.Custom11 As FOP#,
tblAssetCustom.Custom12 As [FOP Approver]
From tblComputersystem
Inner Join tblAssets On tblComputersystem.AssetID = tblAssets.AssetID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Left Outer Join tsysIPLocations On tsysIPLocations.LocationID =
tblAssets.LocationID
Left Join tblPhysicalMemoryArray On
tblAssets.AssetID = tblPhysicalMemoryArray.AssetID
Inner Join (Select tblAssets.AssetID,
Sum(Ceiling(tblPhysicalMemory.Capacity / 1024 / 1024)) As Memory,
Count(tblPhysicalMemory.Win32_PhysicalMemoryid) As Used
From tblAssets
Left Outer Join (TsysMemorytypes
Right Outer Join tblPhysicalMemory On TsysMemorytypes.Memorytype =
tblPhysicalMemory.MemoryType) On tblAssets.AssetID =
tblPhysicalMemory.AssetID
Group By tblAssets.AssetID,
tblPhysicalMemory.MemoryType
Having tblPhysicalMemory.MemoryType <> 11) CorrectMemory On
CorrectMemory.AssetID = tblAssets.AssetID
Where tblAssetCustom.State = 1
Order By tblAssets.AssetName,
[Serial Number]