Forums on Intune, SCCM, and Windows 11

Welcome to the forums. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your topics and posts, as well as connect with other members through your own private inbox!

SOLVED Report to find last logon details of each computer using SCCM

Status
Not open for further replies.

Biman Roy

Member
Messages
19
Reaction score
0
Points
1
I can access both web and MMC console for SCCM. I need to know the a) software count b) the PC/server names using the software c) the person who last logged in to the PC/server.


What report should I look into?
 
a) Software count - I did not get this. Please clarify.

b) PC/server names using the software - Report name - Computers with a specific product and Report Category - Software Companies and Products.

c) Person who logged in to last PC - You have to use the below query

Code:
SELECT     Name0 AS 'Computer', CONVERT(varchar(10), DATEADD(ms, lastLogon0 / CAST(10000 AS bigint) % 86400000, DATEADD(day,

                     lastLogon0 / CAST(864000000000 AS bigint) - 109207, 0)), 111) AS 'Last AD Logon'

FROM         v_R_System

WHERE     (lastLogon0 IS NOT NULL)

ORDER BY 'Last AD Logon'
 
Thanks Prajwal,

Let me rephrase my query:


I can access both web and MMC console for SCCM. I need to know the a) softwares used in my site b) the PC/server names using those software c) the person who last logged in to the PC/servers – all in one report


What report should I look into?


I ran your query, and I got the below error:


Msg 207, Level 16, State 1, Line 1

Invalid column name 'lastLogon0'.

Msg 207, Level 16, State 1, Line 1

Invalid column name 'lastLogon0'.

Msg 207, Level 16, State 1, Line 1

Invalid column name 'lastLogon0'
 
yes, even i got the same error. Can you try this query ?. This one worked for me
Code:
Select distinct
v_R_System.Netbios_Name0 AS "Computer Name",
v_GS_SYSTEM_CONSOLE_USER.SystemConsoleUser0 AS "Console User",
v_GS_SYSTEM_CONSOLE_USER.NumberOfConsoleLogons0 AS "Console Logons",
v_GS_SYSTEM_CONSOLE_USER.TotalUserConsoleMinutes0 AS "Total Minutes on Console",
v_GS_SYSTEM_CONSOLE_USER.LastConsoleUse0 AS "Last Console Use"
from v_R_System INNER JOIN
(SELECT
ResourceID,
SystemConsoleUser0,
NumberOfConsoleLogons0,
TotalUserConsoleMinutes0,
LastConsoleUse0,
ROW_NUMBER() OVER(PARTITION BY ResourceID ORDER BY LastConsoleUse0 DESC) AS Point
FROM
v_GS_SYSTEM_CONSOLE_USER) v_GS_SYSTEM_CONSOLE_USER
ON v_GS_SYSTEM_CONSOLE_USER.ResourceID = v_R_System.ResourceID
AND v_GS_SYSTEM_CONSOLE_USER.Point = 1
Order by v_R_System.Netbios_Name0
 
b) PC/server names using the software - Report name - Computers with a specific product and Report Category - Software Companies and Products.

a) List of software - Report - Software 06A
 
I am looking for a report which will give me the below fields. If one query serves the purpose then it will be good. Please let me know the queries.

The fields I need are:

Computer name
Computer OS version (windows 7 or 2008…)
IP
Lastlogin on console
Last date when the data was gathered from the computer
All the software containing the string “visio”​

THANKS VERY MUCH
 
I have one more query need. How do I know which computers have not pushed their data in last 10 days. THANKS
 
Prajwal, I meant to ask "Which are the computers that have not pushed their data to SCCM server in last 10 days"
 
I copy-pasted the query in the above URL in "Create Query Wizard". But it reports syntax error. I chose "Object Type" "System Resource"
 
did you read the line in the post "If you import the query on your own don’t forget to create a prompt called @varCollection." Have you done this ?. I would suggest to download the mof file first.
 
Hi, Is there any way to find user login on Win10 devices on particular date?

I need to generate 2 reports based on who logged on to each device on 2 different dates.
 
Hi, Is there any way to find user login on Win10 devices on particular date?

I need to generate 2 reports based on who logged on to each device on 2 different dates.
CM is not the tool for this. You want to query AD directly for this info.
 
Status
Not open for further replies.

Forum statistics

Threads
7,199
Messages
28,093
Members
18,370
Latest member
lynnc

Trending content

Back
Top