‎11-20-2018 02:47 PM
insert into dbo.tsysreports (dbo.tsystreports.Reportquery, dbo.tsysreports.Reporttitle, dbo.tsysreports.CreatedBy, dbo.tsysreports.Created)
values ('cust_ot_servers','OT Intake Servers','Lansweeper Installation', GETDATE());
create view dbo.cust_ot_servers as
Select
tblAssets.AssetName As Title,
tblADComputers.Description As Description,
null As Type,
REPLACE(REPLACE(REPLACE(tblComputersystem.Roles, 'LM_Workstation , LM_Server ,', ''),'NT , Server_NT',''), ',','') As Role,
tsysOS.OSname As "Operating System",
tblAssets.IPAddress As "Ip Addres",
null As "Environment Status",
tblAssets.Memory As Memory,
null As Alias,
null As Hostgroup,
null As Connection,
null As Version,
null As "Vendor Support ID",
tblSystemEnclosure.SerialNumber As "Serial Number",
null As "Nr. Sockets",
tblAssets.NrProcessors As "Nr. Cores",
null As "Management URL",
null As "Maintenance Window",
null As "Linked Datastore",
tblComputersystem.Model As "Hardware Type",
null As "Connection Port",
null As "Backup Engine",
null As "Attached Storage",
null As "Additional Role",
null As "Additional IP Address"
From tblComputersystem
Inner join tblSystemEnclosure on tblSystemEnclosure.AssetID = tblComputerSystem.AssetID
Inner Join tblAssets On tblComputersystem.AssetID = tblAssets.AssetID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Inner Join tblADComputers on tblADComputers.AssetId = tblAssets.AssetID
Left Join tsysIPLocations On tsysIPLocations.StartIP <= tblAssets.IPNumeric
And tsysIPLocations.EndIP >= tblAssets.IPNumeric
Where tblComputersystem.Domainrole > 1 And tblAssetCustom.State = 1;
‎06-20-2019 04:46 PM
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now