http://www.techygeekshome.co.uk/2012/10/find-system-by-last-logged-on-user.html


Is this the one you were referring to?

select SMS_R_System.LastLogonUserName, SMS_R_System.Name,
SMS_R_System.SMSAssignedSites, SMS_R_System.Client,
SMS_R_System.IPAddresses, SMS_R_System.IPSubnets,
SMS_R_System.MACAddresses, SMS_R_System.OperatingSystemNameandVersion,
SMS_R_System.ResourceDomainORWorkgroup, SMS_R_System.LastLogonUserDomain,
SMS_R_System.AgentName, SMS_R_System.AgentSite, SMS_R_System.AgentTime,
SMS_R_System.SNMPCommunityName, SMS_R_System.SystemRoles,
SMS_R_System.SMSUniqueIdentifier, SMS_R_System.ResourceId,
SMS_R_System.ResourceNames, SMS_R_System.ResourceType,
SMS_R_System.NetbiosName from SMS_R_System where
SMS_R_System.LastLogonUserName = ##PRM:SMS_R_System.LastLogonUserName## -
See more at:
http://www.techygeekshome.co.uk/2012/10/find-system-by-last-logged-on-user.html#sthash.nCmnL9hn.dpuf


On Mon, Feb 3, 2014 at 9:00 AM, Burke, John <[email protected]>wrote:

>  want to get the pc's listed out - with their ad information, os, group
> membership then get the user information (ad location, department, job
> role, plus group membership)
>
>
> You think this would work better in SSRS? I think the group membership
> info is a bit odd when you look at it in sql.. which is why i used to use
> that wql.
>
>  ------------------------------
> *From:* [email protected] [mailto:
> [email protected]] *On Behalf Of *Dzikowski, Michael
> *Sent:* Monday, February 03, 2014 12:56 PM
> *To:* [email protected]
> *Subject:* [mssms] RE: Querry no longer works in sccm 2007 r2?
>
>   Why not do something in SQL or SSRS?
>
>
>
> Whats the goal of the WQL? What information do you need?
>
>
>
> *Michael Dzikowski*
>
> Senior Systems Engineer |  Ally Technical Infrastructure - Windows Hosting
>
> [image: cid:[email protected]]
>
>
>
> *From:* [email protected] [mailto:
> [email protected]] *On Behalf Of *Burke, John
> *Sent:* Monday, February 03, 2014 11:44 AM
> *To:* [email protected]
> *Subject:* [mssms] Querry no longer works in sccm 2007 r2?
>
>
>
> I used to be able to run this wql querry which woudl return all the pc
> info and all the user info (based on last logged on user) including group
> memberships. (it seems to be difficult to get that information out of the
> web reports.
>
>
>
> It no longer works. Any ideas? It's being run against a collection with
> 120 pc's in it.
>
>
>
> select SMS_R_System.*, SMS_R_User.*  from SMS_R_System inner join
> SMS_R_User on SMS_R_User.UserName = SMS_R_System.LastLogonUserName
>
>
>
>
>


<<image001.png>>

Reply via email to