Hi All,
We were working on report that can compare the objects available in Active Directory and not in SCCM, initially we planned to use LogParser and a VB Script which will fetch Active Directory objects and updates in a TempDB. Post, we can create a report to compare the clients that are available in AD but not in SCCM Database.
But we are not indent to disturb the Database using LogParser. hence we have created a query which will compare the V_R_System and V_GS_Computer_System to identify the clients that are available in Active Directory but not in SCCM or without SCCM Client, and this report also shows you lastLogon details.
I hope this can help some one out there.
SQL Query
---------
SELECT Name0, sys1.Operating_System_Name_and0, DATEDIFF(dd, [Last_Logon_Timestamp0], getdate()) AS 'days LastLogon'
FROM v_r_system sys1
WHERE Name0 NOT IN (SELECT name0 FROM v_GS_Computer_System)
ORDER BY [days LastLogon]
--------
-
------------------------------------------
Ur's -> SithaYuvaraj | SCCM Administrator
------------------------------------------
-
This posting is provided AS-IS with no warranties/guarantees and confers no rights.
-
We were working on report that can compare the objects available in Active Directory and not in SCCM, initially we planned to use LogParser and a VB Script which will fetch Active Directory objects and updates in a TempDB. Post, we can create a report to compare the clients that are available in AD but not in SCCM Database.
But we are not indent to disturb the Database using LogParser. hence we have created a query which will compare the V_R_System and V_GS_Computer_System to identify the clients that are available in Active Directory but not in SCCM or without SCCM Client, and this report also shows you lastLogon details.
I hope this can help some one out there.
SQL Query
---------
SELECT Name0, sys1.Operating_System_Name_and0, DATEDIFF(dd, [Last_Logon_Timestamp0], getdate()) AS 'days LastLogon'
FROM v_r_system sys1
WHERE Name0 NOT IN (SELECT name0 FROM v_GS_Computer_System)
ORDER BY [days LastLogon]
--------
-
------------------------------------------
Ur's -> SithaYuvaraj | SCCM Administrator
------------------------------------------
-
This posting is provided AS-IS with no warranties/guarantees and confers no rights.
-
4 comments:
Short and Sweet
This query really helped me.
keep up the good work.
Great report, question though.
Is Last_Logon_Timestamp0 for the System or User?
Thank you !
Just the query i was looking for.
Post a Comment