Find Machines added to SCCM in the last 7 Days

select distinct (name0) ,creation_date0,datediff(day, creation_date0, {fn Now()}) as Age, CLIENT0,ad_site_name0,active0

from v_r_system


where (1=1)

--and ad_site_name0 is null
--and client0 is null
--and ad_site_name0 is not null
and operating_system_name_and0 not like '%mac%'

and operating_system_name_and0 not like '%server%'

--GROUP BY NAME0
and (datediff(day, creation_date0, {fn Now()}) < 8)

ORDER BY NAME0, age DESC

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s