Quantcast
Channel: Symantec Connect - Endpoint Management - Discussions
Viewing all articles
Browse latest Browse all 6689

Computer report

$
0
0
I need a solution

I know nothing about SQL. I would like a computer report as below to also contain  the part number. What would I have to add.

 

Thanks

 

 
DECLARE @v1_TrusteeScope nvarchar(max)
SET @v1_TrusteeScope = N'%TrusteeScope%'

SELECT DISTINCT i.Guid, 
CASE WHEN i.Domain = '' AND CHARINDEX('.', i.[Name]) <> 0 THEN SUBSTRING (i.[Name],0,CHARINDEX ('.',i.[Name])) ELSE i.[Name] END [Name],    
CASE WHEN i.Domain = '' AND CHARINDEX('.', i.[Name]) <> 0 THEN REPLACE (i.[Name],SUBSTRING (i.[Name],0,CHARINDEX ('.',i.[Name]))+ '.','') ELSE i.Domain END [Domain],   
sn1.Manufacturer [Manufacturer],   
sn1.[Model] [Computer Model],    
cpu.[Max Clock Speed (Mega-hertz)] [CPU Frequency], 
cpu.[Family] [CPU Type],     
sn1.[Total Physical Memory (Bytes)] / (1024 * 1024) [Memory (MB)],     
ISNULL (i.[OS Name],os.[Name]) [Operating System],     
d.[OS Version] [OS Version],          
CST.[Max Media Size (Kilobytes)] / (1024) [Disk Size(MB)],   
ld.[Free Space (Bytes)] [Free Space(MB)],   
sn1.[Identifying Number] [Serial Number]
FROM dbo.vComputer i     
 JOIN dbo.ScopeMembership sm
  ON sm.[ResourceGuid] = i.Guid
  AND sm.[ScopeCollectionGuid] IN (SELECT * FROM dbo.fnGetTrusteeScopeCollections (@v1_TrusteeScope))
 LEFT JOIN dbo.Inv_AeX_AC_Identification d
  ON d._ResourceGuid = i.Guid
 JOIN dbo.CollectionMembership cm   
  ON cm.ResourceGuid = i.[Guid]   
 JOIN dbo.vCollection it   
  ON it.Guid = cm.CollectionGuid   
 LEFT JOIN dbo.vHWPhysicalMemory m1   
  ON  m1.[_ResourceGuid] = i.Guid      
 JOIN dbo.vHWComputerSystem sn1   
  ON  sn1.[_ResourceGuid] = i.Guid      
 LEFT JOIN dbo.Inv_HW_Processor cpu  
  ON cpu.[_ResourceGuid] = i.[Guid]
 LEFT JOIN  (SELECT SUM ([Free Space (Bytes)] / (1024 * 1024)) [Free Space (Bytes)], _ResourceGuid
  FROM dbo.vHWLogicalDisk WHERE [Logical Disk Type] = 3 GROUP BY _ResourceGuid) ld
  ON i.Guid = ld._ResourceGuid
 LEFT JOIN dbo.vOSOperatingSystem os
  ON os._ResourceGuid = i.Guid
 JOIN (SELECT SUM ([Max Media Size (Kilobytes)]) [Max Media Size (Kilobytes)], 
    _ResourceGuid FROM vHWStorage 
    WHERE [Media Type] = 29 
    GROUP BY _ResourceGuid)CST
  ON CST._ResourceGuid = i.Guid
WHERE 1 = 1   
AND LOWER (i.[Name]) LIKE LOWER ('%ComputerName%') 
AND i.Domain LIKE '%Domain%'   
AND lower (it.[Guid]) LIKE lower ('%Filter%')    
       
 

1393426380

Viewing all articles
Browse latest Browse all 6689

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>