collection Query/ Report to get computer Model/Serial Number for a given computer

Create a New report and paste the below query with prompt asking for computer name:

select a.name0 ,b.SerialNumber0,c.model0  from
v_R_System a,v_GS_PC_BIOS b,v_GS_COMPUTER_SYSTEM c
where
a.ResourceID=b.ResourceID and
a.ResourceID=c.ResourceID AND
a.name0=@hostname

Prompt for computer name @hostname:

select name0 from v_GS_computer_system

Below is the collection which will prompt for computer name which should be created under component management--->queries section.

select SMS_G_System_COMPUTER_SYSTEM.Manufacturer, SMS_G_System_PC_BIOS.SerialNumber, SMS_G_System_COMPUTER_SYSTEM.Model, SMS_R_System.LastLogonUserName from  SMS_R_System inner join SMS_G_System_PC_BIOS on SMS_G_System_PC_BIOS.ResourceID = SMS_R_System.ResourceId inner join SMS_G_System_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_R_System.Name = ##PRM:SMS_R_System.Name##

Leave a Reply