Daniel is there a report I can pull all the Hardware information from the last 90 days.
I was using this sql Query.
declare @LastSeenDays int
set @LastSeenDays = 90
select
upper(a.Domain) as DomainName,
upper(a.AssetName) as DeviceName,
--replace(replace(os.Caption,''(R)'',''''),'','','''') as OperatingSystem,
replace(os.Caption,'(R)','''') as OperatingSystem,
case
when os.Caption like '%Server%' then 'Server'
when bat.AssetID is not null then 'Laptop'
when os.Caption is null then null
else 'Desktop'
end as DeviceType,
case
when os.ServicePackMajorVersion > 0 and os.ServicePackMinorVersion > 0 then os.ServicePackMajorVersion + '.' + os.ServicePackMinorVersion
when os.ServicePackMajorVersion > 0 then os.ServicePackMajorVersion
end as ServicePack,
a.IPAddress as IPAddress,
case
when ac.Model = 'VMware Virtual Platform' then 'Virtual'
when ac.Model = 'Virtual Machine' then 'Virtual'
when ac.Model = 'HVM domU' then 'Virtual'
when ac.Model = 'VirtualBox' then 'Virtual'
when ac.Manufacturer = 'QEMU' then 'Virtual'
when ac.Model is null then null
when ac.Model = '' then null
else 'Physical'
end as PhysicalOrVirtual,
ac.Manufacturer as Make,
ac.Model as Model,
b.SerialNumber as SerialNumber,
ltrim(replace(replace(p.Name,'(R)',''),'(TM)','')) as CPUName,
c.NumberOfProcessors as NumberPhysicalCPUs,
case
when c.NumberOfLogicalProcessors is null then c.NumberOfProcessors
else c.NumberOfLogicalProcessors
end as NumberLogicalCPUs,
cast(c.TotalPhysicalMemory as bigint) as RAMinBytes,
case
when a.Username <> '' then a.Userdomain + '\' + a.Username
end as LastLoggedOnUser,
isnull(a.Lastseen, a.Firstseen) as LastSeenDate,
null as Environment,
null as PhysicalHost,
null as BusinessUnit,
null as CountryOfUse,
null as OSMobility,
null as TerminalServer
from tblAssets a
join tblComputersystem c on a.AssetID = c.AssetID
left join tblOperatingsystem os on os.AssetID = a.AssetID
left join tblBIOS b on b.AssetID = a.AssetID
left join tblPROCESSOR p on p.AssetID = a.AssetID and p.DeviceID ='CPU0'
left join tblBattery bat on bat.AssetID = a.AssetID
left join tblAssetCustom ac on a.AssetID = ac.AssetID
where
(datediff(d, isnull(a.Lastseen, a.Firstseen), getdate()) <= @LastSeenDays or @LastSeenDays = 0)
order by 2