Of course change 'COL001' to be ur collectionid Sent from my Windows Phone
Jimmy Martin (901) 227-8209 ________________________________ From: Haritwal, Dhiraj<mailto:dhiraj.harit...@ap.sony.com> Sent: 4/14/2016 11:38 PM To: ms...@lists.myitforum.com<mailto:ms...@lists.myitforum.com> Subject: [mssms] RE: List of PCs in a Collection - how to get the associated users for each device Try below query. SELECT DISTINCT v_R_System.Netbios_Name0 as "Computer Name", v_R_System.User_Name0 as LastLoggedOnUser, v_GS_OPERATING_SYSTEM.Caption0 as "Operating System", v_GS_COMPUTER_SYSTEM.Manufacturer0 as "Manufacturer" FROM v_R_System inner join v_GS_OPERATING_SYSTEM on v_GS_OPERATING_SYSTEM.ResourceID = v_R_System.ResourceID inner join v_GS_COMPUTER_SYSTEM on v_GS_COMPUTER_SYSTEM.ResourceID = v_R_System.ResourceID inner join v_FullCollectionMembership on v_FullCollectionMembership.ResourceID = v_R_System.ResourceID inner join v_Site on v_FullCollectionMembership.SiteCode = v_Site.SiteCode WHERE v_FullCollectionMembership.CollectionID = 'COL001' ORDER BY v_R_System.Netbios_Name0 Regards, Dhiraj From: listsadmin@lists.myitforum.com [mailto:listsadmin@lists.myitforum.com] On Behalf Of Brian McDonald Sent: 15 April 2016 08:56 To: ms...@lists.myitforum.com Subject: [mssms] List of PCs in a Collection - how to get the associated users for each device Is it possible to look-up the last logged on user to a PC in SCCM natively? I have a collection of 50 devices and have been asked to get the last logged on user for each of these devices. What's the best way to do this? Thanks, Brian ________________________________ This email is confidential and intended only for the use of the individual or entity named above and may contain information that is privileged. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this email is strictly prohibited. If you have received this email in error, please notify us immediately by return email or telephone and destroy the original message. - This mail is sent via Sony Asia Pacific Mail Gateway.. This message and any files transmitted with it may contain legally privileged, confidential, or proprietary information. If you are not the intended recipient of this message, you are not permitted to use, copy, or forward it, in whole or in part without the express consent of the sender. Please notify the sender of the error by reply email, disregard the foregoing messages, and delete it immediately. P Please consider the environment before printing this email...