Clients Installed in Past 24 Hours

Need to know which devices installed the Config Manager client during the past 24 hours, or any other time period you’re interested in? Create a query using the following code to return computer name, agent time (UTC), domain and client. Limit the query to any collection you choose. I used All Windows 7 Client Systems which previously had the SCCM client installed as I’m preparing to upgrade them to Windows 10 using a Config Manager task sequence. Change the getdate()) <= 24 figure to the number of hours you need…

Read More

SQL Query : Systems With Hardware Scan > 60 Days ago

You can identify devices which have not checked in for some time, or those with potentially faulty SCCM clients using this query.  SELECT a.ResourceID, a.Netbios_name0, b.LastHWScan FROM v_R_System a INNER JOIN v_GS_WORKSTATION_STATUS b ON a.ResourceID = b.ResourceID WHERE b.LastHWScan <= Dateadd(day, -60, getdate()) order by LastHWScan desc Sample Output    

Read More

VB Script : Repair SCCM Client Remotely

My VB is not great and I think this script was borrowed from somebody who knows what they were doing.  The link is below. ‘Repair SCCM Client ‘———————————————————— Option Explicit On Error Resume Next Dim sComputer, sSCCMClient If WScript.Arguments.Count = 0 Then sComputer = InputBox(“Enter computer name to repair”) Else sComputer = WScript.Arguments(0) End If Set sSCCMClient = GetObject(“winmgmts://” & sComputer & “/Root/Ccm:SMS_Client”) If Err <> 0 Then MsgBox “Error:” & “(” & Err.Number & “)” & vbCrLf & Err.Description Else sSCCMClient.RepairClient MsgBox (“Repair started for ” & UCase(sComputer)) End…

Read More